comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Taking another spanking.
Date: Mon, 8 Jun 2009 17:40:59 -0500
Date: 2009-06-08T17:40:59-05:00	[thread overview]
Message-ID: <h0k42o$3k4$1@munin.nbi.dk> (raw)
In-Reply-To: 4a2a6ef5$0$30223$9b4e6d93@newsspool1.arcor-online.net

"Georg Bauhaus" <rm.tsoh.plus-bug.bauhaus@maps.futureapps.de> wrote in 
message news:4a2a6ef5$0$30223$9b4e6d93@newsspool1.arcor-online.net...
...
>> 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.

Packages like GNAT.Sockets.Thin are supposed to be private packages; then 
users *couldn't* use it (it would be illegal to reference in a with clause). 
Indeed, the reason that "private with" was added in Ada 2005 was to make 
that more possible.

It's always better to use the language facilities to prevent misuse rather 
than trust users to read and follow the documentation. There's always 
someone who won't follow the written directions! (That's why almost all of 
the Claw implementation articfacts are hidden in private parts and private 
packages.)

                                          Randy.





  parent reply	other threads:[~2009-06-08 22:40 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
2009-06-08 22:40             ` Randy Brukardt [this message]
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