Manifest constants using 'manifest' keyword?

jcc7 technocrat7 at gmail.com
Fri Dec 21 08:10:42 PST 2007


== Quote from Derek Parnell (derek at psych.ward)'s article
> On Fri, 21 Dec 2007 12:07:03 -0300, Leandro Lucarella wrote:
> > According to phobos changeset 535[1] I guess we have a new
> > 'manifest' keyword to define manifest (to be redundant) constants.
> > I really think he should went with alias or macro or with other
> > better *existing* keyword, but is definitely better than enum.

Yay!


> >
> I agree. Until one gets to know what it means, "manifest" looks like
> a noun rather than an adjective. I can just see newbies saying
> things like ... "what is a 'manifest'" when confronted with stuff
> like ...
>
> manifest
> {
>    int Foo;
>    long Bar;
> }

Well, there's always a learning curve with a new language. I think newbies will be
able to figure it out fairly quickly by reading the documentation.

I think they'll find "manifest" a lot easier to understand than a reuse (misuse?)
of enum would have been. (I thought that reusing enum was not the right way to go
at all.)

I don't remember what my favorite enum-alternative was (as there were several and
I wasn't paying attention that closely), but I think manifest was a fine choice.



More information about the Digitalmars-d mailing list