In writing, does dialogue have to go on a new line?
It depends on what you’re trying to convey. In formal writing, new dialogue always gets a new line. In more abstract writing, such as in Ulysses, dialogue is blended with train of thought. Or, like in The Road, there aren’t any breaks or punctuation that generally accompany dialogue. These techniques change the way the material is read and processed. If you’re being graded on it, go with formal.