Hacker News new | ask | show | jobs
by anonymoushn 1407 days ago
I did not purchase a C standard from ISO, but a draft specifies that text streams and binary streams are both supported, and that text streams may perform all sorts of implementation-defined destruction on your data. Some small part of the article seems to be related to this.
2 comments

About drafts...

Iirc, the last draft before final publication is free and it's just as good.

As another user replied, there is more going on in the post than what is specified, guaranteed, etc, by the standard.

The practice of C programming in an actual system using non-standard things is important. Also, the C language does have its problems, even within the standard. However, pinning to C problems of a not-so-helpful implementation, library, system, etc, is unfair and unhelpful I believe.

The streams discussed in the article are neither text nor binary. They're record-oriented files, which are not supported by the C language standard. Operations on record-oriented files are a vendor extension that work however the vendor says they work.

On the other hand, record-oriented files work just peachy with ISO standard COBOL.