News for hackers. Stuff that matters.
Re:CoffeeScript: less typing, bad readability by mnutt on Monday September 17, 2012 @09:15PM (#4535760)
While I agree with your points,

    doSomething () -> 'hello' just isn't valid code.
Is valid code. Not that you'd ever actually want to use it:

    coffee> doSomething = (fn) -> if fn then fn() else (-> 'hi')
    doSomething = (fn) -> if fn then fn() else (-> 'hi')
    [Function]
    coffee>  doSomething() -> 'hello'
    doSomething() -> 'hello'
    'hi'
    coffee> doSomething () -> 'hello'
    doSomething () -> 'hello'
    'hello'

There are no comments on this comment yet.