4 ms·
At the call site, unless it's a keyword argument, you don't know what the parameter is named. IDEs help with this of course, but it's not just the "2 options b
by habitue 4y ago
At the call site, unless it's a keyword argument, you don't know what the parameter is named.
IDEs help with this of course, but it's not just the "2 options becomes 3 options" situation that recommends against them
- zepolen 4y agoThat's not a problem with bool arguments, that's a problem with the language and tooling.
- xupybd 4y agoThat can be resolved with enums.
- zepolen 4y agoIf your language/tooling and naming is bad then no, enums won't resolve it either: Is this a username or a state? create_user('ADMIN') Same for, could be a variable for the admin username, can't be sure can you: create_user(ADMIN) Even this: create_user(User.ADMIN)