Re:“Modern” C++ Lamentations
by int_19h on Friday December 28, 2018 @05:18PM
(#18779925)
It predates C tho. In Simula-67, not only I/O was in functions, it was in methods (on file objects). In Pascal, it was also all functions, also some of those were magic (e.g. overloaded on types, in a way user-defined functions couldn't be) - but it still described them as functions.
[ Parent
| on HN ]
I said unusual not unique, but perhaps I should have been clearer.
Pascal and C were definitely influenced by Simula, a language ahead of its time.
When K&R wrote that line I suspect they were thinking more of PL/1 which was the Multics implementation language. Though it has OPEN/CLOSE etc they were keywords not external labels.
I think it’s pretty likely K had heard of Pascal at the time.
More interestingly BCPL’s i/o was via library rather than innate. And c descends directly from BCPL (->b->c) rather than from PL/1; simula-67 and BCPL were developed contemporaneously in Europe.
Again, apologies for my prior brevity.