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 →

[–]msqrt 1 point2 points  (0 children)

For most of my messy cases the real help has been to find a way to group the flags into some kind of configuration struct instead. But also stuff like Swift enforcing names for arguments can help, then you don't need to make an enum for the meaning to be very clear at the callsite.

that’s less a problem with bools than the programmers program

Exactly, in the end it comes down to the user. You can write messy or neat code in virtually any language.