From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f6f130eea077b8f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-23 12:55:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: 'Write attribute vs Write procedure. Date: 23 May 2003 20:55:10 +0100 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1053719746 28893 62.49.19.209 (23 May 2003 19:55:46 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Fri, 23 May 2003 19:55:46 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:37713 Date: 2003-05-23T20:55:10+01:00 List-Id: Craig Carey 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.