
Show HN: Quaint – a statically typed language with seamless resumable functions - bluetomcat
https://github.com/bbu/quaint-lang
======
nikolay
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!

~~~
bluetomcat
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 {

~~~
nikolay
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.

