3 ms·
There is nothing more maintainable about the clean code variant either.
by fartsucker69 4y ago
There is nothing more maintainable about the clean code variant either.
- gjulianm 4y agoThere is. The first one is that the code with the switch pattern can only process simple shapes. Let's say you want to get the area of a donut now. Well, you need to change the whole code to compute the area of the union. Or imagine that there are other places in the code that need to know the area of a single shape. Do they need to copy/paste the same code?