Live data from Hacker News

Underscores are stupid

devblog.avdi.org

11–20 of 131 posts

Re: Underscores are stupid

#11

I write code slower than my typing speed anyway. This sort of typing efficiency obsession leads people to use dvorak or crazy non-standard keyboards. No thanks, not worth caring about.

Yes I rather thing that the writer has a bit too much time on his hands

Re: Underscores are stupid

#12

There's an easy fix for part of the problem: bind shift-space to underscore. Yes, you still require shift, but IMO it's the stretch not the shift that makes typing an underscore jarring. xmodmap -e 'keycode 65 = space underscore'

Unless you use Emacs (as the author seems to), in which case you have S-Space bound to starting/ending selection. But in general yes, one can rebind underscore to something that doesn't require pressing Shift.

Re: Underscores are stupid

#13

I write code slower than my typing speed anyway. This sort of typing efficiency obsession leads people to use dvorak or crazy non-standard keyboards. No thanks, not worth caring about.

Yes I rather thing that the writer has a bit too much time on his hands

Maybe because he's eliminated all that time wasted by typing underscores.

Re: Underscores are stupid

#15

All you have give up for this is tightly-packed arithmetic statements, like this: 5*5-3 Instead, you have to give your tokens some breathing room: 5 * 5 - 3 I don't know, that seems pretty stupid too.

and gets even worse if you bring variables into the game. a = 5 b = 3 everybody from nearly every programming language would expect that after c = a-b you will find c to be 2 not nil (or throwing an exception or whatever)

I've always found code without spaces around these symbols to be very undreadable.

Re: Underscores are stupid

#16
This may solve your problem:

    my.long.name = 1
    a.short.name = 2

    one.long.result = a.short.name - my.long.name

    one.string:trim:upper
Use dots for identifiers and colons for class props and methods.

Now we just need to design a whole new language :(

Re: Underscores are stupid

#17

I use case instead of underscore. Doesn't help the shift-issue, but reduces the length of identifiers e.g. file_not_found becomes FileNotFound.

IThinkItIsObjectivelyMuchLessReadable

I_think_it_is_objectively_much_more_readable

The difference in length is pretty small anyway.

Re: Underscores are stupid

#19
Semicolons. Underscores. Spaces. Tabs. Every couple weeks it's some new minutiae profiled as the cause of all the world's problems. Don't people have better things to focus on than this?

Re: Underscores are stupid

#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.

Post reply on HN