comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: 'Write attribute vs Write procedure.
Date: 23 May 2003 20:55:10 +0100
Date: 2003-05-23T20:55:10+01:00	[thread overview]
Message-ID: <x7vof1t780x.fsf@smaug.pushface.org> (raw)
In-Reply-To: prarcv0cidajjkv1t1favsv4ch0qglht1s@4ax.com

Craig Carey <research@ijs.co.nz> writes:

> So similarly, GNAT.Sockets could be altered so that the comments in it
> suggesting use of Ada 95's X'Read feature, are deleted or discouraged.
> 
> X'Read() has no parameter for diagnostics on what the malfunction was.
> The language can be revised so that X'Read is deleted or else it returns
> error information out directly so that it is available to very next
> line in the source code. If Ada becomes a language where malfunctioning
> programs don't know why, and are really cryptic in describing the
> precise problem (e.g. since code in exception handlers tries to handle too
> many errors), then it could be all made reasonable (insufficiently
> reasonable) by the new style of new unneeded code that seems to do
> ntohing to a single byte but just lose the error info so that the next
> line can't get it (it has to be the line after if the code is in an
> exception handler).

I don't understand this ..

A "simple" solution to your problem (not to mine!) might be to have a
package -- _not_ a revised GNAT.Sockets, please! -- which doesn't deal
with Streams, but with something else.

You still have the option to (for example) encapsulate the data you're
actually interested in in a "datagram" preceded by length information,
so you can read the "datagram" into a Stream_Element_Array and then
internally stream from that (this is the approach we are adopting for
UDP sockets).

> However ACT is saying that customers do not seek big changes in
> GNAT.Sockets.

There is certainly a problem with reading classwide objects from UDP
sockets.



  reply	other threads:[~2003-05-23 19:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-21  0:07 'Write attribute vs Write procedure Jano
2003-05-21  0:42 ` tmoran
2003-05-21  7:48   ` Ole-Hjalmar Kristensen
2003-05-21  9:23   ` Ole-Hjalmar Kristensen
2003-05-21 16:22     ` tmoran
2003-05-22  7:51       ` Ole-Hjalmar Kristensen
2003-05-21 16:24     ` tmoran
2003-05-21 21:17     ` Simon Wright
2003-05-22  8:02       ` Ole-Hjalmar Kristensen
2003-05-22 13:49       ` Marc A. Criley
2003-05-22 20:07         ` Simon Wright
2003-05-23  6:09   ` Craig Carey
2003-05-23 19:55     ` Simon Wright [this message]
2003-05-23 20:48       ` AI-248 and counting the elements in an external file Larry Kilgallen
2003-05-23 21:12         ` Stephen Leake
2003-05-23 21:45           ` Randy Brukardt
2003-05-24  1:45             ` Larry Kilgallen
2003-05-24 22:00               ` Robert I. Eachus
2003-05-25  3:54                 ` Larry Kilgallen
2003-05-27 20:19                   ` Randy Brukardt
2003-05-27 20:57                     ` Larry Kilgallen
2003-05-28 18:26                       ` Randy Brukardt
2003-05-24  1:42           ` Larry Kilgallen
2003-05-28 21:17             ` Brian Gaffney
2003-05-28 22:06               ` Larry Kilgallen
2003-05-24 14:11 ` 'Write attribute vs Write procedure Craig Carey
replies disabled

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