Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Quaint – a statically typed language with seamless resumable functions (github.com/bbu)
4 points by bluetomcat on April 15, 2016 | hide | past | favorite | 3 comments



Honestly, "elif" is terrible! If you dare to use the "long" keywords such as "sizeof" and "alignof", please, use "elseif" at least! Or, in this case, what's wrong with "else if"? The single word makes sense for languages like Python.

Outside of ^^^, the language is beautiful. Thank you!


The rational part of me screams that "else if" should be a single token, so I'm left with: elif, elsif or elseif.

"else if" is really an old C hack that enables the parser to not have a special production for else-ifs, and it would generate a deep parse tree, rather than a flat one. I feel like that is wrong. A chain of if-elif-else should be conceptually linear, not nested.

Moreover, in a language that doesn't require parens around the conditions, it would look rather "disorientating":

    } else if a == b && b == c {


Only primitive parsers would be bothered by multiple tokens in a row - tey don't have to be one word, you don't even need a special separator - it's only needed in languages like Python. That's why Java, C#, JavaScript, and others don't need an "elif" equivalent - it's all a matter of code formatting and not nesting redundantly.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: