I wouldn't say I like it but I would say that pretty much every other syntax for lambda that I've seen looks worse 😅 except for the unicode λ in Granule, of course 😉
Conversation
You could go the Java or JS route, but that way leads to terrifying 'covering grammars' 262.ecma-international.org/7.0/#prod-Cove
1
4
I wouldn't mind something like (x -> x*x)
3
3
Java style, woooo docs.oracle.com/javase/specs/j
1
3
Or were you thinking of the parens being mandatory?
1
1
1
yes
1
1
although this is probably a terrible terrible syntax anyway considering we may want to eventually use lambda at the type level
1
yeah that would be my concern - also having arrow types in terms
1
1
One solution would be to use a different token, like `=>`
1
1
I find that a bit confusing with `<=` meaning less than or greater..
how about `|->` ("maps to")?
2
Yeah, that is an issue. Seems like JS is cool with it at least… I guess I don't notice it as much due to code ligatures 😅


