News for hackers. Stuff that matters.
Re:Flags Are a Code Smell (2014) by enraged_camel on Saturday May 21, 2022 @08:03PM (#31463482)
You should read the article more carefully, specifically the second paragraph. Of course it is true that anything can be misused. What makes something a smell, according to the author, is that it is likely to be used incorrectly, perhaps because the distinction between correct and incorrect usage is not immediately obvious. I think the argument has merit and the example supports it sufficiently well.
Re:Flags Are a Code Smell (2014) by dvt on Saturday May 21, 2022 @08:08PM (#31463519)
The article describes an implementation detail: it's still a flag and can still be misused, but the article cleverly avoids discussing how. Component/entity-based engines (which is basically what the proposed solution is) have been around for like 20+ years. Here's me asking about it over a decade ago[1].

[1] https://stackoverflow.com/questions/4941953/the-composite-pa...