Comment

Comment by woodruffw

I agree this is weird, but I think it's largely an analogy issue: Ruby and Crystal both explicitly document blocks as not being closures, even when they can be converted into closures. They're their own weird thing.

Crystal also documents that it will fail if the block contains return or break statements[1].

[1]: https://crystal-lang.org/reference/1.13/syntax_and_semantics...

parent woodruffw 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton