Hacker News new | ask | show | jobs
by tomxor 2467 days ago
> what's the compelling reason for using this rather than one of the many other languages?

vs JavaScript (which it transpiles to) the intro teases more functional programming features like lambdas, but that's the only reference in the doc. The intro to functions section does not mention strict lambdas, only anonymous functions, so it's not clear if they can still access globals.

I would welcome lambda syntax in JS, you can sort of just be strict with yourself, but it takes more effort to _read_ when something is a lambda but you have to manually parse it to be sure.

1 comments

Yes I use arrow functions all the time but I was under the impression expressions must be strictly closed to be true lambdas? although to be honest i can't find any definitive info on this, so now I suspect my definition might be too strict...

I find it very useful to know that all variables in the expression are bound, expressions with free variable can be more complex to reason about, which is fine, but it would be nice to be able to easily differentiate without having to carefully parse each expression first - so a separate syntax just for that purpose would be nice - I thought that's what true lambda functions were (disallowing free variables), but it looks like i'm wrong, i guess that feature doesn't exist.