zlacker

[return to "Nimony (Nim 3.0) Design Principles"]
1. mwkauf+M2[view] [source] 2025-12-02 01:00:22
>>andsoi+(OP)
Big "college freshman" energy in this take:

  I personally prefer to make the error state part of the objects: Streams can be in an error state, floats can be NaN and integers should be low(int) if they are invalid (low(int) is a pointless value anyway as it has no positive equivalent).
It's fine to pick sentinel values for errors in context, but describing 0x80000000 as "pointless" in general with such a weak justification doesn't inspire confidence.
◧◩
2. ratmic+sIb[view] [source] 2025-12-05 13:10:09
>>mwkauf+M2
Without the low int the even/odd theorem falls apart for wrap around I've definitely seen algorithms that rely upon that.

I would agree, whether error values are in or out of band is pretty context dependent such as whether you answered a homework question wrong, or your dog ate it. One is not a condition that can be graded.

◧◩◪
3. umanwi+Q1c[view] [source] 2025-12-05 14:48:25
>>ratmic+sIb
What is the "even/odd theorem" ?
[go to top]