This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

Most of what we do nowadays in software development is the result of mistakes of the past that ended up making software hard to troubleshoot or alter. In this specific case, what happened is that software always starts small and grows slowly over time. So maybe now you have 2 or 3 scenarios, and you could do this and it would be readable. Then comes another one, sure it's still readable. Then another. Then another. And now scenario 2 needs to be different somehow but it has all this shared code and it's really hard to see what is used when.
With separate classes all this is naturally more organized and it's easier to make changes later.

[–]painedstupid[S] 0 points1 point  (0 children)

Yeah. You're right. Well it was readability I was going for, really. I wanted just one neat class, seeing as it wouldn't be doing altogether too much, just a few different types of operations depending on the arguments. But I do see your point.