eat food for food in foods when food isnt ‘chocolate’

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.

Of the many attempts to re-invent Javascript, the mostly puzzling to me are those that do not fix any problems, and then invents some more. I realize there is a strong desire to borrow ideas from Ruby and bring them to Javascript, but where one can’t do that cleanly, one shouldn’t do it at all.

It’s a tool, that is all.
Ambiguous code is a poorly thought out contrived example with a simple solution.
To me, this:
eat food for food in foods when food isnt ‘chocolate’
Is kind of beautiful and much more readable than:
for (var i = 0, var len = foods.length; i < len; i++) { var food = foods[i]; if (food !== 'chocolate') { eat(food); } } How is this even an argument?: "One wouldn’t realize it was conditional until reading the end." How do you expect to understand any code without reading it? How do you understand people when they talk without listening? And the whole paragraph is moot with syntax highlighting. Variable clobbering is javascript's problem not coffescript's. ECMAScript 6 introduces a syntactic sugar for classes as well as like every single JS framework. Knowing plain old JS is important, especially for understanding CS. CS is just a tool that some people find useful, I don't really understand the passion or frustration.

Post external references

  1. 1
    https://news.ycombinator.com/item?id=7496522
Source