News for hackers. Stuff that matters.
Re:Spider Programming Language by fizzbatter on Monday November 17, 2014 @12:43PM (#8619314)
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!

Re:Spider Programming Language by 14113 on Monday November 17, 2014 @01:02PM (#8619429)
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.
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

Re:Spider Programming Language by woah on Monday November 17, 2014 @01:20PM (#8619550)
ES6 already has =>, I think that Spider should probably stay far away from trying to replicate existing language features with different syntax
Re:Spider Programming Language by tomp on Monday November 17, 2014 @01:26PM (#8619597)
Many functional languages have shortcut syntax for inline functions, e.g. in OCaml:

  let f = fun x y -> x + y
Haskell:

  let f = \x y -> x + y
It looks that Spider uses a similar syntax, but uses uncurried form in line with function invocation syntax.
Re:Spider Programming Language by alongub on Monday November 17, 2014 @12:50PM (#8619354)
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.