comp.lang.ada
 help / color / mirror / Atom feed
From: xorque <xorquewasp@googlemail.com>
Subject: Re: Forcing use of "constructors"
Date: Mon, 23 Nov 2009 06:15:55 -0800 (PST)
Date: 2009-11-23T06:15:55-08:00	[thread overview]
Message-ID: <e3b5b2ce-22e4-4117-aa39-5563fecb6908@x15g2000vbr.googlegroups.com> (raw)
In-Reply-To: 27db03bc-9655-4a65-a730-bcad83bfe616@h2g2000vbd.googlegroups.com

On Nov 23, 1:38 pm, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:
>
> Declare your type to have unknown discriminants:
>
> package P is
>    type T (<>) -- unknown discriminants: objects requires
> initialization

Nice, thanks. I knew it was something along these lines...

>
> You can also make your type controlled or limited controlled. You can
> expose the controlledness in the public part or hide it in the private
> part.

This raises a good point, actually - I've never really been sure what
the advantage is of exposing the controlledness (or hiding it, for
that
matter). I hide everything by habit but I'm not sure if I'm causing
a consumer deep problems down the line...

Regards,
xw




  reply	other threads:[~2009-11-23 14:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-23 11:41 Forcing use of "constructors" xorque
2009-11-23 13:38 ` Ludovic Brenta
2009-11-23 14:15   ` xorque [this message]
2009-11-23 14:20   ` Maciej Sobczak
2009-11-23 16:18   ` Robert A Duff
replies disabled

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