> but arguing for else-if with execution speed arguments isn't the way.
Depends on the code base and problem domain you code / live in. In most cases you're right, but in my domain it's a different story.
> Moreover, else-if is probably the most misused conditional
You can misuse anything in any language, so by this logic we should argue that we shall abolish all programming altogether. I can misuse threads to make a program slower, misuse memory allocator to fragment the memory, etc. etc.
So I don't think "but people misuse it" is a great argument either.
Depends on the code base and problem domain you code / live in. In most cases you're right, but in my domain it's a different story.
> Moreover, else-if is probably the most misused conditional
You can misuse anything in any language, so by this logic we should argue that we shall abolish all programming altogether. I can misuse threads to make a program slower, misuse memory allocator to fragment the memory, etc. etc.
So I don't think "but people misuse it" is a great argument either.