I found this: Style recommendation for enum as type, which has discussion on the difference between enumerated types, and types that can be dispatched apon.
Alexander has marked this topic as unresolved.
Alexander has marked this topic as resolved.
from an out-of-the-box REPL:
julia> zero(true)
false
julia> zero(false)
false
julia> one(false)
true
julia> one(true)
true
Learning by Breaking
Sebastian Pfitzner said:
It does say "Subsequent characters may also include ! and digits (0-9 and other characters in categories Nd/No)", which kinda implies that those are not allowed at the start
"Subsequen t characters may also include ! and digits (0-9 and other characters in categories Nd/No)", implies that characters other than a-z, _, A-Z,!, 0-9, "subset of Unicode code points greater than 00A0" and so on, are not allowed either at the beginning or as subsequent characters, in my opinion.
In any case, the definition seems to me not "clean" as it speaks as allowed characters of UN SUBSET unspecified of Unicode code points greater than 00A0
It is not clear whether all code points greater than 00A0 or only some (which?) of them are intended.
yes, Bool
is a Integer
in julia
which IMO is much more sensible than the reverse where a lot of languages treat integers as booleans
yes, but only if you error when trying to index with a boolean
else writing x > 4
instead of x >> 4
in an indexing expression by accident is horrible to debug
Last updated: Oct 02 2023 at 04:34 UTC