comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: GNAT.Serial_Communication and Streams
Date: Tue, 24 Nov 2015 10:28:20 +0000
Date: 2015-11-24T10:28:20+00:00	[thread overview]
Message-ID: <lyy4dn3d4r.fsf@pushface.org> (raw)
In-Reply-To: z1z0lmyfw8oz.11i1vv0zjj8ur$.dlg@40tude.net

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> I don't see anything wrong with the original code. Stream attributes
> not to be trusted in general. An explicit conversion is clearer and
> cleaner, IMO.

GNAT used to write strings to streams character-by-character, which is
seriously non-optimal (practically; if an exception occurs, who cares on
which character it happened?!)

But if you can't trust your compiler to write a string to a stream, what
can you trust it to do?

I wholly agree with "trust, but verify", though!


  reply	other threads:[~2015-11-24 10:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-22 21:40 GNAT.Serial_Communication and Streams rrr.eee.27
2015-11-22 21:52 ` Simon Wright
2015-11-22 21:54 ` Jeffrey R. Carter
2015-11-24  1:29   ` Randy Brukardt
2015-11-24 16:09     ` Jeffrey R. Carter
2015-11-24  8:28   ` Dmitry A. Kazakov
2015-11-24 10:28     ` Simon Wright [this message]
2015-11-24 10:45       ` Dmitry A. Kazakov
2015-11-25  6:24         ` Shark8
2015-11-25  8:07           ` Simon Wright
2015-11-25  8:52           ` Dmitry A. Kazakov
2015-11-25 12:45             ` Shark8
2015-11-25 17:43               ` Dmitry A. Kazakov
2015-11-29  8:45                 ` Shark8
2015-11-29  9:33                   ` Dmitry A. Kazakov
2015-11-29 11:34                     ` Simon Wright
replies disabled

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