Re: Javascript: Time Traveller From the Year 1962!

[prev] [thread] [next] [lurker] [Date index for 2005/04/09]

From: Michael G Schwern
Subject: Re: Javascript: Time Traveller From the Year 1962!
Date: 03:07 on 09 Apr 2005
On Fri, Apr 08, 2005 at 08:32:36PM -0500, Peter da Silva wrote:
> > You'll notice it was one of the first libraries they bolted on.
>
> Um, no, it wasn't.
>
> It wasn't until the '80s before there was a standard I/O library for C. 

There were libraries for I/O long before there was a standard library.

K&R C had a "standard" I/O library back in 1978 which incorporated most of
the functionality various C compiler vendors had already bolted on.  People 
needed I/O and would implement it themselves.  Without a standard there 
was a menagere of competing, incompatible I/O libraries and it took over a
decade to clean up the mess...


> and if C had started out with an I/O library typical of
> the '60s it would never have happened... and we'd all be worse off for it.

...this is not to say it did not eventually all work out for the best.  
However, that was then.  I'm talking about languages written NOW where now
== the last ten years or so.


> > In fact,
> > I've listed "trivializing I/O" as one of the "language design regrets".
> 
> It's not "trivialising I/O", it's "avoiding premature standardization", and
> it's one of C's strengths... not a weakness.

Like I said, C is the exception.  Its just one step above the metal.
Its the sort of language you DO write I/O drivers in.  I might throw 
something like Forth into that pile.  Javascript or Lua do not go in there.
They are modern, high level languages designed to be run in environments
where I/O has already been taken care of for them... probably in C.

Additionally, C was written in 1972.  Back then they were still figuring the
basics out.  Its 2005 now.  We've learned a few things about I/O in the last 
THIRTY YEARS.  Here in the year 2005 we have a pretty good idea about how 
I/O should work (in part because of the pain C went through).  At least 
enough to know to ignore it at our peril.  Java is going through its own
I/O pain right now as we watch because they abstracted it into oblivion.

C is the exception.  Its old.  Its very low level.  Using it as a guideline 
for a modern, high level language will only lead to regret. 

Generated at 12:00 on 12 Apr 2005 by mariachi 0.52