Aijan@programming.dev to Programming@programming.dev · 3 months agoAvoiding if-else Hell: The Functional Stylelackofimagination.orgexternal-linkmessage-square35fedilinkarrow-up195arrow-down18
arrow-up187arrow-down1external-linkAvoiding if-else Hell: The Functional Stylelackofimagination.orgAijan@programming.dev to Programming@programming.dev · 3 months agomessage-square35fedilink
minus-squareFizzyOrange@programming.devlinkfedilinkarrow-up4·3 months agoThis is really terrible advice. Sometimes it’s better to do that, but definitely not in the example from this article. If anyone says you should always prefer polymorphism to switches they are a bloody idiot.
minus-squarePushButton@lemmy.worldlinkfedilinkarrow-up3·3 months agoI always love watching people falling for Clown-Bob’s advises… Let’s go, let’s eat shit on toasts! It’s just a matter of how thin you can spread it to hide the taste…
This is really terrible advice. Sometimes it’s better to do that, but definitely not in the example from this article.
If anyone says you should always prefer polymorphism to switches they are a bloody idiot.
I always love watching people falling for Clown-Bob’s advises…
Let’s go, let’s eat shit on toasts! It’s just a matter of how thin you can spread it to hide the taste…