Re:Taskfile: A Modern Alternative to Makefile
by Brian_K_White on Sunday July 16, 2023 @09:19AM
(#36746694)
Claiming more common words as keywords basically. It's just not well considered. true and false are ordinary words, and it would probably be better if sometime way back someone had come up with special keywords that didn't conflict with ordinary words, but for good or bad, at least by now it's practically universal in most languages that true & false are keywords and everyone knows it. Claiming yes and no as keywords also was just thoughtless and inconsiderate (ok that was redundant), doubly so when they don't even do a new job but simply double the consumed namespace to do the same job that was already done by true & false.
Re:Taskfile: A Modern Alternative to Makefile
by SAI_Peregrinus on Monday July 17, 2023 @12:22PM
(#36760119)
Eh, it's fine if they're keywords as long as not everything is a string. If `"NO"` and `NO` are distinct types, then they're not equal and there's no Norway problem. YAML treats strings, numbers, null, and booleans as all the same type (scalars). The problem isn't keywords clashing with common words, it's not having distinct types!
There's even more options apparently :)
A Boolean represents a true/false value. Booleans are formatted as English words (“true”/“false”, “yes”/“no” or “on”/“off”) for readability and may be abbreviated as a single character “y”/“n” or “Y”/“N”.
Regexp: y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF
Re:Taskfile: A Modern Alternative to Makefile
by Fire-Dragon-DoL on Saturday July 22, 2023 @11:31AM
(#36827072)
To be fair, yaml has a form of inheritance, I wouldn't define it a relatively simple format
The reason is that they specify a boolean value as either "true/false" or "yes/no".
The last alternative causes problems not only for the Norwegian country code (no), but also in cases where you need to specify the actual word "yes"
You could of course end up with the same problem if you need to specify the literal "true" and "false", but by overengineering the acceptable boolean values, they increase the potential problem areas.