The only thing i don't like so far, is `func` and `->` both expressing functions. I use Coffee a ton, and Golang, so oddly enough i love both syntaxes.. but i don't like multiple ways to declare a core feature like functions.
Just my 2c.
Fwiw, i'm going to be trying this out asap - I have high hopes for this replacing my very heavy CoffeeScript usage!
I think it's quite good - it allows a programmer to conceptually separate her "normal" functions from lambda expressions, even if they're essentially equivalent, and one is syntactic sugar for another.
It's not duplicate syntax. `func` adds a named function to the current environment, and `->` only describes an anonymous function. It's the equivalent of `function foo(...)` vs `function(...)` in JS.
Can you not `func(foo){}`? Because that is what would bother me.
`func(foo){}` and `(foo) ->` seem too similar, for my taste at least. Sure, the difference is that one is always anonymous, where as one is sometimes anonymous.. but we've been using `function` as both named and anonymous for ages
I actually agree about this - two ways to do exactly the same thing is generally a bad thing when it comes to language design. But I think that a more important goal is to make the transition from Spider to JS as easy as possible.
Just my 2c.
Fwiw, i'm going to be trying this out asap - I have high hopes for this replacing my very heavy CoffeeScript usage!