Re:Flags Are a Code Smell (2014)
by bb88 on Saturday May 21, 2022 @11:18PM
(#31464594)
I've just come to hate the term "code smell". There are times when you need to take a deeper look at someone else's code, but the implementation may be completely fine given the context.
[ Parent
| on HN ]
If you look at the compiler output from anything, even the "safe" languages like Rust, and I mean really get right down to assembler instructions, you know what you'll see?
Global variables and computed gotos, all over the shop.
Does it work, well, safely, and quickly? Of course.
Would you write code like that? Well, that kind of depends, eh? Is it the correct solution to the problem you have *absolutely right now* and will it remain the correct solution in the face of changing requirements?