comp.lang.ada
 help / color / mirror / Atom feed
From: "Tarjei T. Jensen" <tarjei@online.no>
Subject: Re: Text_IO for other standard types
Date: 1998/01/12
Date: 1998-01-12T00:00:00+00:00	[thread overview]
Message-ID: <34BA9133.7B4B@online.no> (raw)
In-Reply-To: dewar.884522547@merv


Robert Dewar wrote:
> 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.

This sounds eminently sensible. When I program in C I try to remember to
first flush stdout then print the error message and finally flush stderr
before exiting on error conditions. However as also noted below, this is
of little value for those distributing code unless the other vendors
does the same.

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

I still think it should be an official way of manhandling buffering. In
many applications there is a marked improvement in performance when
using largish buffers.

> 
> 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.

I'm focusing on buffering because it would be the easiest one to fix.
And since I have been around for a while I think I have noticed the
effect on languages which did not support buffering. Apparantly you have
fixed it in your implementation, but have the other vendors done
likewise? If not we end up programming in GNAT Ada, Aonix Ada,
Intermetrics Ada, etc.


Greetings,

-- 
// Tarjei T. Jensen 
//    tarjei@online.no || voice +47 51 62 85 58
//   Support you local rescue centre: GET LOST!




  reply	other threads:[~1998-01-12  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 ` 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
1998-01-12  0:00         ` Tarjei T. Jensen [this message]
1998-01-10  0:00 ` Nick Roberts
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-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-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