Remix.run Logo
▲ rep_lodsb 5 hours ago

They should have defined true as -1 (all bits set) instead, as in some other languages like Forth and BASIC.

▲Panzerschrek 3 minutes ago | parent [-]

-1 is not -1 for different sizes of integers. Which exact -1 do you want? 32-bit? 64-bit? int-sized (as int is defined in current implementation)? With current approach it's simple, boolean type is expected to have 1-bit size (which is rounded to 8 bits if stored in memory).