Interesting that he calles dashes "ordinary, easy-to-type, recognizable, [and] visually unambiguous."
What he's referring to as a dash is actually a hyphen (-), which is pretty ambiguous when compared to the en dash (–) and em dash (—), both of which require modifier keys to type (and are frequently used in prose, to counter another of his claims). Fortunately, I've never seen em dashes or en dashes used in code.
He's discussing this in the context of writing code, not typography. I think it's fair to assume we're starting with the premise that we would only choose characters that are easily typed on common keyboards. Choosing uncommon characters in programming languages, such as en-dashes and em-dashes, is choosing to deliberately make our lives more difficult [1].
I think it's pretty clear from the article that his comments were meant to be taken in that context. If he'd chosen to preempt the pedantic readers by making that context explicit, it would have only diluted the article with noise that most people would rightly assume is implied by the context.
I don't know what your keyboard looks like, but mine doesn't have en- or em-dashes on it, and I wouldn't even consider them for a programming language syntax.
[1] Even when using en-dashes and em-dashes in prose, they can often be typed with multiple consecutive hyphens, e.g., '--' and '---' in LaTeX.
While most of the article talks about code, the author mentions underscores being ambiguous in the context of underlined fonts. (I don't even think my text editor [for code] supports underlined fonts.)
He also mentions only using shift once or twice per sentence when writing prose.
So it would seem that the author is just hating on _ in all contexts. Which is kind of silly. (Though I'll admit, the point of it being improperly handled with underlined fonts is certainly a valid complaint.)
I can see where that would be ambiguous. I think he mentioned using shift once or twice per sentence as a baseline for comparing how often we should have to use the shift key when coding. As for the underlining issue, the other reply already mentioned that many editors will underline code.
Come to think of it, I do know some editors that support HTML rendering inside comment blocks.
How would you use it for coding, though? Unless you stripped it before the compile phase I would think any formatting in a rich-text format would choke up almost any interpreter or compiler.
It doesn't need to be rich text. It can just be the way the editor does syntax highlighting. Say, for example, underline all function names. The compiler won't know anything about this style and will therefor not choke on it.
>While most of the article talks about code, the author mentions underscores being ambiguous in the context of underlined fonts. (I don't even think my text editor [for code] supports underlined fonts.)
Lot's of editors do. In Eclipse, for one, it's common to see function names and such shown as hyperlinks when you click on them (with underlines), which makes their definition open (like a function call is "linked" to the function definition).
That's actually not very interesting. He was talking about hyphens, but calling them dashes, because normal people do that unless they are talking about typography.
No. "normal people" call them hyphens. I think it is a mainly USian curiosity to call hyphens dashes. The Rest of the World calls hyphens, well, hyphens. It's only the US that call them dashes. I've no idea why that is.
people outside the US call them dashes as well, though perhaps not with the same frequency. ... --- ... is not 'dot dot dot hyphen hyphen hyphen dot dot dot', for example
What he's referring to as a dash is actually a hyphen (-), which is pretty ambiguous when compared to the en dash (–) and em dash (—), both of which require modifier keys to type (and are frequently used in prose, to counter another of his claims). Fortunately, I've never seen em dashes or en dashes used in code.