From: "Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr>
Subject: Re: Hiding the value of Constants
Date: Tue, 7 Jul 2009 09:26:49 -0700 (PDT)
Date: 2009-07-07T09:26:49-07:00 [thread overview]
Message-ID: <f7cf9984-fbf7-4cae-8495-4dbcd4914efd@a7g2000yqk.googlegroups.com> (raw)
In-Reply-To: 0549aae1-d200-4c81-aa92-8d18df6cf0d4@b25g2000prb.googlegroups.com
On 7 juil, 17:51, Adam Beneschan <a...@irvine.com> wrote:
> I believe the reason enumeration literals are actually functions is so
> that you can use the same enumeration literal in more than one
> enumeration type and not have to worry about name conflicts.
I believe the same
> There are additional bonuses, such as being able to use an
> enumeration literal as the actual for a generic instantiation that
> expects a function. How useful that is in practice, I don't know.
I do not see right away neither, but I don't minde, as it is clear
cristal and as there is nothing of a kind of hack in there.
> I'm not sure why you would want enumeration literals to be treated
> like constants, though.
My words were probably clumsy, beceause I was to suggest the
opposite : treat constants like enumeration literals are.
This would not break any actual code, as actual restrictions on
constants are narrower than the restrictions on enumeration literals.
> If you mean that you'd like
> constants to be treated like static functions, so that you can
> overload them:
>
> Max : constant Integer := 15;
> Max : constant Float := 15.0;
That was this one idea, yes :)
> that's an intriguing idea. Not intriguing enough for me to have to
> make all the necessary changes to our compiler, but intriguing
> nonetheless....
Oops... I apologize, as I'm not a compiler writer (just played with a
tiny-little language of my own, some years ago), I cannot figure out
the amount of difficulty this would involve.
next prev parent reply other threads:[~2009-07-07 16:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-07 8:48 Hiding the value of Constants Rick
2009-07-07 8:54 ` xavier grave
2009-07-07 8:58 ` AdaMagica
2009-07-07 9:41 ` Georg Bauhaus
2009-07-07 10:41 ` Hibou57 (Yannick Duchêne)
2009-07-07 15:51 ` Adam Beneschan
2009-07-07 16:26 ` Hibou57 (Yannick Duchêne) [this message]
2009-07-07 18:48 ` Dmitry A. Kazakov
2009-07-07 19:05 ` Adam Beneschan
2009-07-07 19:53 ` Dmitry A. Kazakov
2009-07-07 20:28 ` Adam Beneschan
2009-07-07 20:57 ` Dmitry A. Kazakov
2009-07-08 10:25 ` Georg Bauhaus
2009-07-08 12:20 ` Dmitry A. Kazakov
2009-07-09 23:04 ` anon
2009-07-10 6:37 ` AdaMagica
2009-07-11 19:06 ` anon
2009-07-11 19:26 ` Georg Bauhaus
2009-07-11 21:53 ` anon
2009-07-11 22:03 ` Albrecht Käfer
2009-07-11 22:15 ` Ed Falis
2009-07-15 9:30 ` anon
2009-07-11 23:31 ` Egil
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox