4 ms·
A lot of processors around you are still 16 and 32 bits. I’ve hit the overflow a lot too. > At the end of the day, code is for people, so keep it easy for peop
by xondono 5y ago
A lot of processors around you are still 16 and 32 bits. I’ve hit the overflow a lot too.
> At the end of the day, code is for people, so keep it easy for people.
This is a dangerous heuristic, because people here means exclusively developers. It’s easy for us to trade annoying but mostly harmless bugs for rare but harmful ones.
- kstenerud 5y agoYes, I hit it a lot during my Z80 days, too. I also had to do manual memory management using a memory-mapped page register. We all have our constraints we must operate under, and a bag of tools to help deal with those constraints. But "unsigned by default" won't save you here; all it does is give you a little more breathing room for your special case code (and hey, maybe that doubled positive integer space is all you needed, in which case congrats). But all of the other problems are still there. That's why I'm saying that "unsigned by default" is backwards. It should be "signed by default", and unsigned for special situations that warrant it.