comp.lang.ada
 help / color / mirror / Atom feed
From: "Mark Lundquist" <mark@rational.com>
Subject: Re: Extensible Enummerated types FW: When will next Ada revision be? (83, 95, ?)
Date: Mon, 22 Jan 2001 09:26:01 -0800
Date: 2001-01-22T09:26:01-08:00	[thread overview]
Message-ID: <94hr7f$oa0$1@usenet.rational.com> (raw)
In-Reply-To: 94fdqb$u4b$1@nnrp1.deja.com


Robert Dewar <robert_dewar@my-deja.com> wrote in message
news:94fdqb$u4b$1@nnrp1.deja.com...
> In article <94f9qf$dc4s7$1@ID-25716.news.dfncis.de>,
>   "Nick Roberts" <nickroberts@callnetuk.com> wrote:
> > I like this idea. It seems to me that it could be really
> useful sometimes
> > (enough to justify it). It also seems to me that there would
> be no major
> > implementation problem. It would require a number of changes
> and insertions
> > to the RM, but nothing drastic. Gets my vote.
>
> I assume you have studied the proposal in the mapping document
> and it is to this proposal that you are referring.
>

BTW, where can we find this mapping document?  It'd be especially nice if
there were an HTML version somewhere... (Someone has also said that it would
be nice if the AI database were more Web-friendly, and I concur).

Anyway, back to the extended enumeration type thing... for my part, I
haven't read the proposal in the mapping document (since I don't have it
:-), so someone needs to tell me what the feature means in that proposal.
Also, I'm not entirely clear what people are asking for, so even if I did
know what the idea was as it was proposed in the 9x process, I still
wouldn't know if that's the same thing :-)

What I want to know is...

Given

    type E1 is (Dog, Cat);
    type E2 is new E1 with (Kangaroo);

I understand what this is supposed to mean in terms of E2's enumeration
literals.  What's not clear to me is whether E2 is supposed to have any
particular relationship to E1.  The only meaninful relationship I can think
of would be the derivation class -- the implication would be that the
enumeration types are tagged.  In that case, you obviously have to know that
E1 is tagged.  Since the syntax of its definition is identical to the
current syntax for enumeration type definitions, then either (a) the idea is
that all enumeration types be tagged (not likely! :-) or (b) people aren't
really asking to do classwide programming on enumeration types after all, or
(c) they are asking for that but haven't thought it through very far :-) :-)

A nice Ada syntax for expressing taggedness of an enumeration type escapes
me right now... I guess it would have to be

    tagged type E1 is (Dog, Cat);

If we're not asking for taggedness/classwide, then E1 and E2 have
absolultely no relationship to each other except that they happen to have
some of the same enumeration literals, right?  In other words, the second
line above is precisely equivalent to saying,

    type E2 is (Dog, Cat, Kangaroo);

in current Ada, with no extra baggage.  In that case, the proposal is just
for some syntactic sugar, correct?

So what is it, sugar or classwide? :-)

If it's classwide, what I would really like to see is a specific example, in
Ada code, of a problem that would be solved by the proposed feature...

- mark







  reply	other threads:[~2001-01-22 17:26 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-20  7:26 Extensible Enummerated types FW: When will next Ada revision be? (83, 95, ?) Robert C. Leif, Ph.D.
2001-01-20 14:06 ` Robert Dewar
2001-01-20 16:19   ` Jeff Creem
2001-01-20 16:23     ` Mark Carroll
2001-01-20 19:18       ` Robert Dewar
2001-01-20 22:27         ` Brian Rogoff
2001-01-21 16:06           ` Robert Dewar
2001-01-21 23:08             ` Brian Rogoff
2001-01-22  2:02               ` Robert Dewar
2001-01-22 16:02                 ` Brian Rogoff
2001-01-22 16:50                   ` Robert Dewar
2001-01-22 21:12                     ` Brian Rogoff
2001-01-22 21:26                       ` Jean-Pierre Rosen
     [not found]                         ` <Pine.BSF.4.21.0101230839000.15065-100000@shell5.ba.best.com>
     [not found]                           ` <94rbdo$vf$1@wanadoo.fr>
2001-01-26 16:41                             ` LOF4 (Was Re: Extensible Enummerated types) Brian Rogoff
2001-01-20 22:34         ` Extensible Enummerated types FW: When will next Ada revision be? (83, 95, ?) Mark Carroll
2001-01-21 16:09           ` Robert Dewar
2001-01-21 19:04             ` Mark Carroll
2001-01-21 19:26               ` Robert Dewar
2001-01-21 21:12                 ` Mark Carroll
2001-01-21 17:47     ` Nick Roberts
2001-01-21 19:37       ` Robert Dewar
2001-01-22 17:26         ` Mark Lundquist [this message]
2001-01-22 20:47           ` Randy Brukardt
2001-01-22 21:41             ` Matthew Woodcraft
2001-01-30 16:17           ` Tucker Taft
2001-01-31  8:05             ` Extensible Enumerated " Robert C. Leif, Ph.D.
2001-02-10 20:34               ` Vincent Marciante
2001-01-31  8:05             ` Supertypes RE: Extensible Enumerated types Robert C. Leif, Ph.D.
2001-01-31 15:15               ` Marin David Condic
2001-02-01 22:03             ` Extensible Enummerated types FW: When will next Ada revision be? (83, 95, ?) Nick Roberts
2001-02-02  3:48               ` Robert Dewar
2001-02-02  4:41                 ` Jeffrey Carter
2001-02-02  7:26                   ` Robert C. Leif, Ph.D.
2001-02-02 16:38                     ` Robert Dewar
2001-02-02 20:39                     ` (Private message. Sorry) Nick Roberts
2001-01-22 15:02 ` Extensible Enummerated types FW: When will next Ada revision be? (83, 95, ?) Ted Dennison
2001-01-28  8:10   ` Robert C. Leif, Ph.D.
2001-02-02 21:54     ` Nick Roberts
replies disabled

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