Autor: Irrwahn Datum: To: dng Betreff: Re: [DNG] [OT] [Re: Studying C as told. (For help)
On Tue, 21 Jun 2016 21:50:10 +0200, Adam Borowski wrote: > It's isalpha() that's an abomination, exactly because its behaviour varies
> between locales.
That depends on the requirements. There are cases where I
as a user would be slightly surprised if some code would
tell me that e.g. Umlauts are not alphabetic characters.
>> And "there's so much broken code already you rely on" should
>> never be an excuse to deliberately produce even more broken code.
>
> I wouldn't call code that assumes 8-bit bytes "broken". I'd call it "sane".
Octet != byte. You yourself brought up earlier the example
of certain outlandish hardware that uses 32-bit bytes.
> Same for EBCDIC. If you have to maintain code inherited from '60s IBM
> mainframes, I pity you, but it's a fact that the rest of the world agreed on
> ASCII.
Fortunately I have not. I simply do not rely on things not
guaranteed, and instead put provided library functions to
their intended use. I guess we have to agree that our
respective mileages vary.