News for hackers. Stuff that matters.
Re:Spider Programming Language by rld on Monday November 17, 2014 @01:45PM (#8619706)
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.
Re:Spider Programming Language by fizzbatter on Monday November 17, 2014 @07:14PM (#8621703)
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