system
Given the following post, respond as if you're commenting on Reddit:
human
Why can no programming language agree on 'else if'?

It seems every language I learn has a different way of doing it:

\- else if

\- elif

\- elsif

\- elseif

etc.

What's the story behind this and why did every language decide to implement it differently?
gpt
In C, C++, Java and related languages there really is no "else if". It's just an "else" immediately followed by an "if" while leaving off the optional curly braces. For example:
```
if (something)
{
    print("hello")
}
else
{
   if (another_thing)
   {
       print("goodbye")
   }
}
```
Remove all the curly braces above and you end up with:
```
if (something)
    print("hello")
else if (another_thing)
    print("goodbye")
```

Other languages can't make use of this grammar hack (e.g., for example Python using indentation instead of optional curly braces to denote code blocks), so they have to have a dedicated keyword for "else if". Nobody has agreed on what this keyword should be yet.