Hacker News new | past | comments | ask | show | jobs | submit login

I don't understand his problem with hash literals. Hash rockets are just ugly and verbose and needed to go (through they're still needed for some object types to be declared as keys).

The positional arguments I'm on-the-fence about. I enjoy them in Elixir, but at the same time I wish it had a little more flexibility to name arguments. And I like the clarity that named arguments provide.

The `then` alias is also a major improvement; `yield_self` is a confusing and ugly combination of protected keywords.




"Hash rockets are just ugly and verbose"

Ugh, you make it sound like playing code golf and counting every character automatically leads to the most readable code.

Replacing a two character operator with a one character operator, or whatever, is not a significant win for developer productivity. More powerful abstraction tools are what allow non linear productivity gains. Slightly different literal syntax is more a bike shedding topic than anything that's going to help programmers produce better software faster.


I contend it pretty much is an issue of bikeshedding. Still, it's less code, and I don't really see how `{ key: 'value' }` is not preferred over `{ :key => 'value' }`. Ok I'm done on this issue...


Then is also a keyword. :D

As for hash literals - I didn't like the addition of the new syntax simply because it's limited to one type of keys. We had a perfectly good universal syntax and introduced a second one just to save up on typing in one common usecase. Not to mention that in the 1.9 syntax you don't use keywords directly but labels, which are different syntactic construct (:keyword vs label:). I think I understand your perspective, but it seems you value typing less and subjective aesthetics and I value mostly simplicity (minimalistic syntax and uniformity being some of its key aspects).


Sorry, reread your comment a couple times, and I still don't understand what you mean by the 1.9 syntax being a label. The keys in `{ key: 'value' }` and `{ :key => 'value' }` are both Symbols.




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

Search: