Stream: helpdesk (published)

Topic: ✔ help with Unicode variables defining a Bit type with ...


view this post on Zulip Peter Goodall (Nov 16 2021 at 22:59):

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.

view this post on Zulip Notification Bot (Nov 17 2021 at 10:44):

Alexander has marked this topic as unresolved.

view this post on Zulip Notification Bot (Nov 17 2021 at 10:45):

Alexander has marked this topic as resolved.

view this post on Zulip Peter Goodall (Nov 17 2021 at 21:05):

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

view this post on Zulip rocco sprmnt21 (Nov 17 2021 at 21:24):

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.

view this post on Zulip Sukera (Nov 17 2021 at 21:46):

yes, Bool is a Integer in julia

view this post on Zulip Mason Protter (Nov 18 2021 at 21:23):

which IMO is much more sensible than the reverse where a lot of languages treat integers as booleans

view this post on Zulip Sukera (Nov 18 2021 at 21:27):

yes, but only if you error when trying to index with a boolean

view this post on Zulip Sukera (Nov 18 2021 at 21:27):

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