Can You Really Code Without IF Statements?by@stephenfiser
6,704 reads

Can You Really Code Without IF Statements?

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

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.

Company Mentioned

Mention Thumbnail
featured image - Can You Really Code Without IF Statements?
Stephen HackerNoon profile picture

@stephenfiser

Stephen


Receive Stories from @stephenfiser

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa