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)

4 Likes

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.

6 Likes

It always seems impossible until its done.

https://quoteinvestigator.com/2016/01/05/done/

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

2 Likes

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

Oh wow, this thread brought back memories - https://redmine.ruby-lang.org/issues/5054

EDIT: Didn’t realize you also opened in Ruby as well - https://redmine.ruby-lang.org/issues/17786

2 Likes