comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: Taking another spanking.
Date: Sat, 06 Jun 2009 17:56:50 GMT
Date: 2009-06-06T17:56:50+00:00	[thread overview]
Message-ID: <C5yWl.328402$4m1.143061@bgtnsc05-news.ops.worldnet.att.net> (raw)
In-Reply-To: 4a2a6ef5$0$30223$9b4e6d93@newsspool1.arcor-online.net

GNAT uses both Ada and C code to create it RTL.  If they were truly serious 
about programmers not using the GNAT.Sockets.Thin package they would simply 
replace the Ada version of Thin with a C version.  And may be the body of 
GNAT.Sockets.  

The deal is if your partition calls for streams type of Sockets then use 
GNAT.Sockets only.  But if a package needs low_level access to the sockets 
interface such as creating a non-standard or security protocol, use 
GNAT.Sockets.Thin only and rebuild a replacement Sockets package. This is 
from a set of emails back in the late 1990s with Adacore.

And besides why recreate the "pragma Import" from the Thin package in order 
to use those low_level routines. That just causes bad programming habits.

Plus with the concept that the GNAT 2009 compiler including C and C like 
structures, I think Adacore wants the new programmers to act as if they if 
they are programming in C/C++ with the style of C/C++. Which means any 
thing goes! 

Comments are for the legal department! No programmer should care about the 
comments in any Ada packages, because as most of the posters here including 
Simon, Martin and yourself have said, Ada programmer must use the Ada RM 
for any reference. So, where is the additional RM sections that not only 
includes the Sockets, but explain the other device packages such as Printer, 
Serial, USB, etc?



In <4a2a6ef5$0$30223$9b4e6d93@newsspool1.arcor-online.net>, Georg Bauhaus <rm.tsoh.plus-bug.bauhaus@maps.futureapps.de> writes:
>anon wrote:
>> As for GNAT.Sockets.Thin -- I expand what "Robert Dewar" the CEO and 
>> one of the chief authors of GNAT said in Aug 3, 1996 at 3:00 am.  
>> 	"If you can do it in C, you can do it in Ada! Use pragma Import 
>>          and call exactly the same routines that you would call from C." 
>> 
>> In this case, I expand that to: Why not use GNAT package GNAT.Sockets.Thin 
>> instead of re-creating a few "pragma import" or re-creating the Thin package. 
>
>GNAT.Sockets is vendor specific, sockets aren't as far as Ada goes.
>GNAT.Sockets.Thin is not only vendor specific, the vendor says you
>should not use it.
>Pragma Import is standard Ada.  POSIX is a standard.
>If sockets are ubiquituous, I'd think that the community
>of Ada programmers might like vendor neutral sockets code.
>Much more than it would like, say, IBM.Rational.Sockets.NonGNAT,
>or GNAT.Sockets.Thin.




  parent reply	other threads:[~2009-06-06 17:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02  8:28 Taking another spanking Petter
2009-06-02 12:16 ` Per Sandberg
2009-06-03  6:11 ` sjw
2009-06-03  7:22   ` Petter
2009-06-03  9:34     ` Pascal Obry
2009-06-03 10:40 ` anon
2009-06-03 19:13   ` sjw
2009-06-04  0:43     ` anon
2009-06-05 19:30       ` sjw
2009-06-05 19:25         ` Per Sandberg
2009-06-06  3:31           ` anon
2009-06-06 10:26           ` sjw
2009-06-06  3:17         ` anon
2009-06-06 13:28           ` Georg Bauhaus
2009-06-06 17:26             ` tmoran
2009-06-06 17:56             ` anon [this message]
2009-06-08 22:40             ` Randy Brukardt
2009-06-09  4:29               ` sjw
replies disabled

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