The Crystal Programming Language Forum

Proposal: New "ends" keyword

I have experience with a super-syntactically-“rich” language - LiveScript. It is indeed very cool to write, but then every time you need to double-check that the parser actually understood the same thing that you meant. Aaand you do that by checking what JavaScript it transpiled to. Lacking that, it might have been infeasible for me to use it.

Coming from Python|Nim, I most definitely don’t love this.
There isn’t a global scale for which paradigms are better. Only what fits in better with each language. And there’s just no way at all to fit this in. (Literally perhaps there is, but just not in any useful way)


Feel free to continue discussing this. I know this is something impossible to implement because the specification makes it ambiguous. So I’ll never accept such change.

Also feel free to come up with a PR for this if you want, as a challenge. Just know that it’s impossible, just like solving the halting problem.


It always seems impossible until its done.

I’m trying to figure out if this is the halting problem. i suspect it might be.


If you can imagine it’s possible, then it is.

Oh wow, this thread brought back memories -

EDIT: Didn’t realize you also opened in Ruby as well -