Re:Joxa – A Modern Lisp for the Erlang VM
by berdario on Saturday June 06, 2015 @11:52AM
(#9671185)
While I agree on the pragmatic value of it, and I think this is a pretty minor blemish in the semantics of Python.
You can easily have booleans as a completely different type, and yet avoid stuff like: `1 if boolean else 0`...
In Haskell, for example, `True + True` and `True == 1` are compile errors (unless you defined wacky Num instances), and the boolean/int "identity" is simply handled by `fromEnum` (which works on any Enum, not only Bool)
You can easily have booleans as a completely different type, and yet avoid stuff like: `1 if boolean else 0`...
In Haskell, for example, `True + True` and `True == 1` are compile errors (unless you defined wacky Num instances), and the boolean/int "identity" is simply handled by `fromEnum` (which works on any Enum, not only Bool)