It seems it's not so much booleans than using unnamed parameters for option parameters. I find myself using this style in C, it does not prevent a mix-up if someone refuses to use named field designators but it works ok : typedef struct options_s { bool toggle_case; bool strip_whitespace; } options_s; char *modify_string(char *str, options_s options) { if (options.toggle_case) { /**/ } if (options.strip_whitespace) {…
If a giant meteor took out WG14 we might get named arguments in C modify_string(.str=str, .options = { .toggle_case = true, .strip_whitespace = false });
Anyone know what the reasons have been for the language not adopting this?