DEV Community

Discussion on: There's no "else if" in JS

 
sanderintveld profile image
Sander in 't Veld

That was my point, Idan; if-statements are just conditional jumps, and you need those to be Turing complete. I disagree with the idea that if-statements are always a design flaw, because that just leads to using overabstracted solutions for simple problems, e.g. using pattern matching on a boolean condition.

I agree with your virtue, I just don't see something as integral as the if-statement as a 'problematic implementation'.

Thread Thread
 
develcharlie profile image
DevelCharlie

I understand whose is in the functional is alergic to IF statement, but a coder can create a good program without a functional approach. Many developers write code in procedural mode, if you use GNU/Linux you'll know that in many files you'll find IF statements