comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Generic Zero Length Array
Date: Mon, 25 Feb 2008 14:14:49 -0500
Date: 2008-02-25T14:14:49-05:00	[thread overview]
Message-ID: <wccmypo97bq.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 03b2715a-b4ab-4919-aa1d-97bfbf0f1c07@64g2000hsw.googlegroups.com

Adam Beneschan <adam@irvine.com> writes:

> On Feb 23, 6:27 am, Robert A Duff <bobd...@shell01.TheWorld.com>
> wrote:
>>
>> >...I don't think we need "null record" (i.e. in
>> > aggregates) any more either, although certainly nobody is going to
>> > suggest removing it.
>>
>> Why don't we need that?
>
> Because if Rec_Type is a record with no components, Rec_Type'(others
> => <>) will work (and has the same effect as (null record)).

Ah, I see what you mean.

I still want "null record", because it means something different from
"others".  The "null record" means I assert that there are no
components, and please slap me with a compile-time error if
that's not true (or no longer true).  The "others" means that
I want all components to be default-initialized, including
all the ones that have not yet been invented.

If somebody changes "type T is null record" to
"type T is record Blah : Integer; end record;"
I want an error on all the (null record) aggregates.

> Or is there some more complex cases where the "null record" syntax is
> still needed in aggregates?

No.

- Bob



  reply	other threads:[~2008-02-25 19:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 13:31 Generic Zero Length Array shaunpatterson
2008-02-22 13:53 ` Egil Høvik
2008-02-22 13:55   ` shaunpatterson
2008-02-22 14:11     ` Georg Bauhaus
2008-02-22 19:25   ` Randy Brukardt
2008-02-22 23:01     ` Adam Beneschan
2008-02-23  9:30       ` Dmitry A. Kazakov
2008-02-23 14:27       ` Robert A Duff
2008-02-23 16:16         ` Dmitry A. Kazakov
2008-02-25 16:41         ` Adam Beneschan
2008-02-25 19:14           ` Robert A Duff [this message]
2008-02-22 19:25   ` Randy Brukardt
2008-02-22 19:25   ` Randy Brukardt
2008-02-22 14:23 ` Stefan Lucks
2008-02-22 16:52   ` Adam Beneschan
2008-02-22 14:26 ` Robert A Duff
2008-02-22 15:22 ` Stefan Bellon
2008-02-22 23:03   ` Adam Beneschan
2008-02-23 10:19     ` Stefan Bellon
replies disabled

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