Search Results
6/27/2025, 8:11:14 PM
>>713815558
Actual response: if/elses are fine. The reason people have a big stick up their asses over if/elses is due to people doing unreadable logic nests like this:
if(thing)
if(thing2)
if(thing3)
}
}else{
if(thing4){
}else{
}
}
etc etc
If you're going to use conditionals, you should see if you can come up with a way to use early-exit strategies rather than massive if/else blocks.
Also, switches > ifs
Actual response: if/elses are fine. The reason people have a big stick up their asses over if/elses is due to people doing unreadable logic nests like this:
if(thing)
if(thing2)
if(thing3)
}
}else{
if(thing4){
}else{
}
}
etc etc
If you're going to use conditionals, you should see if you can come up with a way to use early-exit strategies rather than massive if/else blocks.
Also, switches > ifs
Page 1