comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Text_IO for other standard types
Date: 1998/01/11
Date: 1998-01-11T00:00:00+00:00	[thread overview]
Message-ID: <dewar.884522547@merv> (raw)
In-Reply-To: 34B88301.4BC4@online.no


Tarjei said

<<Which system will not benefit from doing fewer, but larger writes or
reads when doing general I/O such as screen writes and reading and
writing to files?

As the buffering have few if any "user servicable parts" it would be
perfectly reasonable to ignore some of the buffering requests and
perhaps even raise exceptions on others.

This is the usual case of someone somewhere MIGHT not benefit, so
therefore nobody can have it. Despite the obvious advantages.
>>


You still miss the point. Buffering is not a language feature except
to the extent that you could imagine defining the language in a way
that made it impossible to buffer, but Ada clearly allows buffering
(that is why there is a flush operator).

In GNAT, our normal approach is to buffer files except in the case
where the output is to standard output *and* the output is directed
to a non-regular file (typically the terminal). Certainly users,
*especially* beginners, find it easier if terminal output is not
buffered by default.

The GNAT manual also outlines how to control buffering if you don't
like the default.

Tarjei, this really seems like a tempest in a teapot! You are foucussing
here on buffering, but I think you should be focussing on efficiency.
What would be helpful is to write a program in C and Ada that shows
up the efficiency differences you are talking about, and then analyze
them. Most likely, to the extent such efficiency differences exist, they
have little to do with buffering, but are rather the effect of a much
higher level semantics on the Ada side, e.g. line/page counting. Actually
Stream_IO is a much better semantic level match to ordinary C stream
I/O and that is part of the reason it was put into the language.





  parent reply	other threads:[~1998-01-11  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-09  0:00 Text_IO for other standard types Marin David Condic, 561.796.8997, M/S 731-96
1998-01-10  0:00 ` Nick Roberts
1998-01-10  0:00 ` Tarjei T. Jensen
1998-01-10  0:00   ` Robert Dewar
1998-01-11  0:00     ` Tarjei T. Jensen
1998-01-11  0:00       ` Robert Dewar
1998-01-11  0:00       ` Robert Dewar [this message]
1998-01-12  0:00         ` Tarjei T. Jensen
1998-01-11  0:00 ` Jean-Pierre Rosen
1998-01-14  0:00   ` Dale Stanbrough
1998-01-14  0:00     ` Robert Dewar
1998-01-14  0:00       ` Tarjei T. Jensen
1998-01-14  0:00         ` Robert Dewar
1998-01-15  0:00           ` Speeding up Text_IO Nick Roberts
1998-01-16  0:00             ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1998-01-12  0:00 Text_IO for other standard types Marin David Condic, 561.796.8997, M/S 731-96
1998-01-15  0:00 Marin David Condic, 561.796.8997, M/S 731-96
1998-01-15  0:00 ` Nick Roberts
1998-01-15  0:00 ` Robert Dewar
1998-01-16  0:00   ` Nick Roberts
1998-01-16  0:00     ` Robert Dewar
1998-01-17  0:00       ` Geert Bosch
1998-01-17  0:00         ` Robert Dewar
1998-01-15  0:00 ` Robert Dewar
1998-01-17  0:00 ` Jean-Pierre Rosen
1998-01-17  0:00   ` Robert Dewar
1998-01-18  0:00     ` Michael F Brenner
1998-01-19  0:00 Marin David Condic, 561.796.8997, M/S 731-96
1998-01-20  0:00 Marin David Condic, 561.796.8997, M/S 731-96
1998-01-21  0:00 ` Jean-Pierre Rosen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox