News for hackers. Stuff that matters.
Re:Poll: What are your liked and disliked programming langua... by jashkenas on Thursday October 10, 2013 @09:48AM (#6527610)
Not quite -- the rule is pretty simple: Implicit function calls associate to the right, to the end of the line (or the end of the trailing block). This allows you to write code like this:

    console.log inspect value

    model.save(attrs).then ->
      ui.update attrs

    rect.scale height * factor

... and have all of the results come out correctly, while leaving the code readable. If the rules were "more math-like" as you say, then none of that would work. Perhaps it would harmonize with special libraries that used functions (automatic-partial-application a-la Haskell) in a different way than JavaScript does ... but that's not the world we live in. It's gotta harmonize with JS functions as they exist.
Re:Poll: What are your liked and disliked programming langua... by aaronem on Thursday October 10, 2013 @10:57AM (#6528058)
I'm not sure where the idea originated that readability scales inversely with the number of parentheses, but I wish it would hurry up and die.
Re:Poll: What are your liked and disliked programming langua... by lowboy on Thursday October 10, 2013 @12:00PM (#6528403)
I'm not sure where the idea originated that readability scales with the number of parentheses, but I wish it would hurry up and die.
Re:Poll: What are your liked and disliked programming langua... by aaronem on Thursday October 10, 2013 @01:04PM (#6528781)
I'm not sure where the idea originated that readability scales, but &c., &c.
Re:Poll: What are your liked and disliked programming langua... by throwaway_yy2Di on Thursday October 10, 2013 @10:08AM (#6527753)
My brain isn't plastic enough to make this switch. :( For me, those code examples are uncomfortable to look at. backwards read to trying like It's
Re:Poll: What are your liked and disliked programming langua... by jashkenas on Thursday October 10, 2013 @10:16AM (#6527813)
Right-o. The trick is to "read" it like pseudocode, or like English-ish.

    Log the inspected value.

    Save the model, then
      Update the UI with the attributes.

    Scale the rectangle by (the height times the factor).
The big syntactic difference still being the "model.save" vs "save the model" ordering of dot-notation. But them's the breaks.