comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: null exclusion and generics
Date: Fri, 20 Oct 2006 09:57:41 +0200
Date: 2006-10-20T09:57:41+02:00	[thread overview]
Message-ID: <rzi6fg9dvwkj$.1sgq0u8z632e4.dlg@40tude.net> (raw)
In-Reply-To: reSdnSjHmLyTRqrYnZ2dnUVZ_qadnZ2d@megapath.net

On Thu, 19 Oct 2006 15:08:17 -0500, Randy Brukardt wrote:

> So all access types are initialized with null, and if the subtype is
> null-excluding, that will automatically raise Constraint_Error. A null
> exclusion is essentially a kind of constraint (it is not technically a
> constraint, but that has to do with independence from other forms of
> constraint). Think of  it being like:
> 
>     subtype A is Integer range 1 .. 10;
> 
>     Obj : A := Integer'First;
> 
> which also will raise C_E. (If we had allowed a way to declare automatic
> initializations for scalar types -- something I wish we had done -- it would
> have had a similar effect as the explicit initialization here).

This is one more reason to finally introduce a sane
construction/destruction model in Ada. Compromises never buy off.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



      reply	other threads:[~2006-10-20  7:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19 12:51 null exclusion and generics Georg Bauhaus
2006-10-19 13:06 ` Dmitry A. Kazakov
2006-10-19 20:08 ` Randy Brukardt
2006-10-20  7:57   ` Dmitry A. Kazakov [this message]
replies disabled

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