4 ms·
Crystal has lambdas w/closures (called Proc) with `->{ 1 }` syntax [0]. Because of ruby-like syntax where `foo` is a call if `foo` is a function you need to do
by mirekrusin 8y ago
Crystal has lambdas w/closures (called Proc) with `->{ 1 }` syntax [0]. Because of ruby-like syntax where `foo` is a call if `foo` is a function you need to do `foo.call` on those lambdas explicitly - so you can distinguish between passing them around as values `foo` and calling them `foo.call` or `foo.call(arg1, arg2, ...)`.
I've played with it a bit, haven't seen problems with compile times, they were actually pretty good.
The nice thing about Crystal is that it is extremely easy to use, terse code, easy macros, fast executables, algebraic types, good packaging story - in general very good ergonomy.
I hope it'll pick up one day.
[0] https://crystal-lang.org/docs/syntax_and_semantics/literals/proc.html https://crystal-lang.org/docs/syntax_and_semantics/literals/...