News for hackers. Stuff that matters.
Re:“Modern” C++ Lamentations by gumby on Friday December 28, 2018 @03:15PM (#18779122)
This was of course one of the key differentiators of C; one of my favorite lines in the original K&R book was "what? I have to call a function to do I/O?"

C was unusual that so much of it was in its libraries rather than being built in. Programming language design in those days didn't have the clean differentiation we have today.. or perhaps did: it's fascinating to see the arc bend back.

Re:“Modern” C++ Lamentations by JulianMorrison on Friday December 28, 2018 @03:35PM (#18779217)
Being in libraries or in the language isn't so much the thing, because really the language is just calling into a hidden library. It's more being directly written, versus being composed of Legos that are themselves composed of Legos... that ends up drawing in a hundred thousand lines of ultra generalist code and then pre-specializing it.
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.
Re:“Modern” C++ Lamentations by gumby on Friday December 28, 2018 @05:36PM (#18780038)
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.