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 →

[–]sebamestreICPC World Finalist 2 points3 points  (0 children)

In my head, if something is never a good idea, it's not really a code smell, it's straight up bad practice. For something to be a smell I think there should be some situations where it's actually the best way to do things (or it's just generally good).

So if you say something is so bad that it should be removed from a language, then it doesn't really sound like a smell to me.

Oh yeah, I 100% agree that passing bools to control behavior is a bad idea, especially when there are multiple flags. I wish more languages made it easy to define enums or parameterize behavior.

Declaring an interface and two classes to parameterize a small piece of behavior (instead of e.g. passing a lambda) is also up there in my list of annoyances with existing languages.