News for hackers. Stuff that matters.
Re:The worst thing about CoffeeScript by emn13 on Saturday January 25, 2014 @02:31PM (#7121972)
Coffeescript isn't consistent.

    setter = (arg) -> store = arg
    store = 'initial'
is quite different from

    store = 'initial'
    setter = (arg) -> store = arg
This is a practical problem since it means that the most commonly used JS encapsulation feature - closures - become harder to write. Suddenly assignments that have no direct influence on each other cannot be blindly reordered (which is a pain), and in particular closures that have a bunch of helper functions defined initially that need to ensure that local variables are set before the helpers, even if those local variables are themselves functions.

It's just a mess. Frankly, I think javascript does this part a lot better than coffeescript, especially now that "use strict" exists and you can get some feedback when your scoping assumptions turn out wrong, rather than a silent failure and unexpected behavior.

There are no comments on this comment yet.