logoalt Hacker News

kibwentoday at 2:46 PM2 repliesview on HN

I still wonder if it wouldn't have been better to let each digit be represented by its exact value, and then use the high end of the scale rather than the low end for the control characters. I suppose by 1970 they were already dealing with the legacy of backwards-compatibility, and people were already accustomed to 0x0 meaning something akin to null?


Replies

mmilunictoday at 3:29 PM

Either way you would still need some check to ensure your digits are digits and not some other type of character. Having zeroed out memory read as a bunch of NUL characters instead of like “00000000” would probably be useful, as “000000” is sometimes a legitimate user input

gpvostoday at 4:03 PM

NUL was often sent as padding to slow (printing) terminals. Although that was just before my time.