3 ms·
C still supports EBCDIC, and other potential non-ASCII character sets one might invent in the future. It promises e.g. that 0..9 is contiguous, but e.g. "case
by avar 3y ago
C still supports EBCDIC, and other potential non-ASCII character sets one might invent in the future.
It promises e.g. that 0..9 is contiguous, but e.g. "case 'A' ... 'Z'" would behave differently.
- buserror 3y agoThat has clearly prevented dozens of other languages to support that feature... because no parser would be able to tell you that range isn't valid at compile time?
- Someone 3y agoIn EBCDIC, ‘Z’ > ‘A’, so the range 'A' ... 'Z' is valid, but may not do what the programmer intended. Most other languages never supported EBCDIC or dropped it long ago. (Also: 'A' ... 'Z' may not do what the programmer intended in most other languages, too. Even ignoring Unicode, quite a few encodings have accented letters that are outside of that range)