News for hackers. Stuff that matters.
Re:It's probably time to stop recommending Clean Code (2020) by zepolen on Saturday February 18, 2023 @04:02AM (#34845284)
That's not a problem with bool arguments, that's a problem with the language and tooling.
Re:It's probably time to stop recommending Clean Code (2020) by xupybd on Saturday February 18, 2023 @04:20AM (#34845380)
That can be resolved with enums.
Re:It's probably time to stop recommending Clean Code (2020) by zepolen on Saturday February 18, 2023 @04:36AM (#34845464)
If 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)