Live data from Hacker News

Underscores are stupid

devblog.avdi.org

1–10 of 131 posts

Re: Underscores are stupid

#2

  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.

Re: Underscores are stupid

#3
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'

Re: Underscores are stupid

#4
One of the most efficient everyday optimizations I've made in the past few years was to adopt the lisp-style naming convention for my local file system hierarchy. Removing all capitalization and special characters (other than the dash) makes navigating via CLI much easier. And having a predictable naming scheme means I rely on tab completion slightly less too, as I have more predictive capability regarding how I might have named things in the past. More generally, treating my home folder as, essentially, an exposed API for which I'm the primary consumer has paid dividends.

Re: Underscores are stupid

#5
I think they should make keyboards with the spacebar divided, and make the left half (or I guess the right if you're left-handed) into a shift key.

Re: Underscores are stupid

#6
This misses one point when comparing Lisp to languages like Ruby. Lisp does not have infix notation. Therefore, you never have to worry that "foo-bar" (the symbol) could ever be confused with "foo - bar” the operation subtracting bar from foo. That’s because in Lisp, foo-bar is written "(- foo bar).”

Since a Lisp programmer spends all his time writing "(- foo bar),” when he sees “foo-bar,” his brain easily parses it as a symbol, and he never needs to wonder whether it should actually have been “foo - bar” with spaces to separate the infix operator from the symbols representing variables.

Re: Underscores are stupid

#8

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)

Re: Underscores are stupid

#9
disagree. like_underscores. concerns about using shift key seem misplaced & for those who have some form of birth defect that prevents use of two fingers simultaneously, keyboard remapping is easy.
Post reply on HN