This example comes from a textbook on programming (Java For Dummies by Burd, 2011):

End-of-line comments: The text //I? You? in Listing 3-6 is an end-of-line comment. An end-of-line comment starts with two slashes and goes to the end of a line of type. Once again, the compiler doesn’t translate the text inside the end-of-line comment.

How do you understand that?

  • Type = typed letters. Read up on "typography".
    – TimR
    Commented Apr 4, 2015 at 15:00
  • I think this is General Reference. Definition 5e there: a printed character or printed characters, example a headline in large type. Commented Apr 4, 2015 at 15:41

1 Answer 1


The text is describing how a compiler or interpreter for some particular language identifies the difference between the logical end of a line and the physical end of a line of a source file.

Each line in that source file is, technically, "a line of type," or "typewritten characters." In reality, however, the phrase "of type" is implied in context and, therefore, redundant. The author could write "...goes to the end of a line" and convey the same information.

  • 2
    Yes, but another reason it's a poor usage is that this usage essentially refers back to the actual typesetting print blocks which are now obsolete in the printing industry. In a modern "computer keyboard input" context I think line of text would be much more appropriate (assuming we ignore the redundancy arising from the fact that said line by definition consists of "text"). Commented Apr 4, 2015 at 15:46
  • Well said and very much on point.
    – David W
    Commented Apr 4, 2015 at 15:51
  • The first paragraph isn't really the correct way to describe it. First, I'm not really sure that "physical end or a line" has a real meaning for computer files, as they're just bytes. But the real problem is that there's only one end-of-line, represented by the linefeed character (0X0D or '\n') in *nix, or the carriage-return/linefeed pair in Windoze. So everything up until the end-of-line is a line. The // comment delimiter means that everything between it and the end-of-line is a comment.
    – jamesqf
    Commented Apr 4, 2015 at 18:35
  • @Fumble - I think line of characters might be better than "line of text". One could argue that "text" implies words in prose form, and many computer comments might not look anything like that (e.g., //since i^2=-1)
    – J.R.
    Commented Apr 4, 2015 at 18:38
  • @J.R.: Well, I agree with David that it's redundant anyway. But given the context (format of comments in lines of program code) I see no chance that anyone could actually think in terms of text = prose. Don't forget that most programmers are perfectly familiar with text = character format data, because in many languages, text = [character] string is one of a small number of system-supported "native format" data types. Commented Apr 4, 2015 at 20:02

Not the answer you're looking for? Browse other questions tagged .