DEV Community 👩‍💻👨‍💻

Discussion on: Keeping your code clean by sweeping out "if" statements

lagerenas profile image

The map IS your config file. With a good CI/CD setup changing the code to add an item to the map is no more difficult than updating a config file.

tomazfernandes profile image
Tomaz Lemos Author

Yeah, I can see that, but the perspective of not changing a single class is tempting. It makes sense to me to keep the configuration of the integration responses separated from the application logic. But in practice, as you say, changing this structure in the code itself shouldn't be harmful anyway. Thanks!