Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't see how prefix notation would ameliorate this problem. You'll still wind up with:

    (+ ( ... big thing 1 ...)
       ( ... big thing 2 ...))
I don't think this syntax does a better job of conveying a lack of ordering between the two things. I'm inclined to argue that it's worse simply because Lisp is sequential and the math you did in school wasn't, so you have experience looking at the bigger picture with infix versus prefix. But both of us are bullshitting, because we haven't got any science to support one position or attack the other, only reasonable-seeming hypotheses.

Haskell is my favorite language, but I find I get a lot more use out of converting words to operators than converting operators to "words." For example, I find this:

    x `elem` y
a lot more intuitive than:

    elem x y
because the infix version suggests the natural English reading, that the set is the second argument and the item is the first, where in the prefix case I have to think about it for a second.


...true, it's bullshitting ...or it's an entirely subjective thing, depending on how you're used to think :)

...but it's that different feeling that "add 'big thing 1' with 'big thing 2'" vs. "compute 'big thing 1' and then add 'big thing 2' to it" ...and if you think of a programming language as an "interface" between your mind and the computer, and think of a programming language from a UI or UX design perspective, these subjective "how it feels" things really do matter. But indeed, Haskell wins on this one 100% by allowing you to just use whatever notation you like without having to write or use a reader macro or something like this. Anyway, back to real work now...


You use too many ellipses. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: