Live data from Hacker News

Underscores are stupid

devblog.avdi.org

51–60 of 131 posts

Re: Underscores are stupid

#51
What colour do you want your bikeshed painted today?

I for one, don't like the "->" operator in C. It requires two characters and the use of the shift key. I would like that the next standard just used "." for all member access and let the compiler work its magic and guess what needs to be done.

Of course that would break a sizeable amount of legacy code, but who cares about that anyway. The important is that the code looks good, especially if I enable drop shadows and anisotropic filtering in my editor.

Re: Underscores are stupid

#52
post #51

What colour do you want your bikeshed painted today? I for one, don't like the "->" operator in C. It requires two characters and the use of the shift key. I would like that the next standard just used "." for all member access and let the compiler work its magic and guess what needs to be done. Of course that would break a sizeable amount of legacy code, but who cares about that anyway. The important is that the cod…

I like the arrow since it reminds me sometimes that I'm working with a pointer and not an object on the stack

Re: Underscores are stupid

#54
Bravo!

Also underscores in uri strings look awful.

this_uri_is_ugly.html

vs

this-uri-is-pretty.html

I wish python allowed for dash in its script names... cannot import from module-test.py but I can from module_test.py

Thank you for posting this, I "laughed-out-loud".

Re: Underscores are stupid

#56
post #20

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.

Re: Underscores are stupid

#58
> Underscores require me to hit the Shift key. When writing prose, I only hit the shift once or twice per sentence. In Ruby, I have to hit the shift key every few letters. Awkward. Inefficient.

Oh my, oh my, how do people ever cope with that vile "having to hit shift" that have regular capitalisation of all nouns etc. Surely such a thing is impossible, as is hitting shift when you need an underscore.

I understand that some things could be more efficient, but "hitting shift" hardly qualifies in my opinion...

Re: Underscores are stupid

#59
repeat after me.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die lisp die.

die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.die.

Post reply on HN