paint-brush
Can You Really Code Without IF Statements?by@stephenfiser
8,190 reads
8,190 reads

Can You Really Code Without IF Statements?

by StephenMay 2nd, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The guiding idea behind coding without IF statements is the Open/Closed Principle (the "O" from SOLID) The principle states "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification";[1] that is, such an entity can allow its behaviour to be extended without modifying its source code. To follow the principle, you've got to be able to add new functionality to an entity (or class) without changing the source code. This can lead to wildly complex code that's next to impossible to change.
featured image - Can You Really Code Without IF Statements?
Stephen HackerNoon profile picture
Stephen

Stephen

@stephenfiser

L O A D I N G
. . . comments & more!

About Author

Stephen HackerNoon profile picture
Stephen@stephenfiser

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite