2 ms·
I smell a language problem when the cited problem is only the automatically added boolean checks. Note that scheme (Racket) has explicit #true and #false value
by rurban 11y ago
I smell a language problem when the cited problem is only the automatically added boolean checks.
Note that scheme (Racket) has explicit #true and #false values, and the type Boolean contains only those, while most other dynamic languages define booleans as nil or null or 0 as false (some even ""), and everything else as true.
So you don't have to add type checks for a sound system, only a NULL/nil check, which is done in the op, and does not needed to be added for each argument or return value.
So it's only a problem for soundly typed scheme and some other obscure languages with explicit booleans, such as my potion, but not for most other dynamic languages, which have the NULL checks in the op already.
Only very few specialized ops which permit no NULL args need this check.
I smell a typical Felleisen. He hates types.