ID:2287835
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
.
The syntax should be more like

var/lambda = (){ return "Hello world" }
var/lambda2 = (a, b){ return a + b + 10 }
world << lambda() //"Hello world"
world << lambda2(5, 2) //17

It's a lot closer to lambda syntax in languages like C#, and doesn't cause confusion with [] which is used for indexing lists (and with 512 being able to read-only index letters out of strings)
And this is where BYOND's indent system begins to hurt.

Personally, C#'s ([args]) => {} is nice.

Also that C++ syntax makes absolutely no sense, I have a hard time believing that is like that for any other reason than "the language is a mess already and this won't be a pain for compilers".
It makes sense if you know how to use it. Personally I like the added capture flexibility of the C++ version more.
(and with 512 being able to read-only index letters out of strings)
Oh cool, I didn't know that was a thing now.