Manifest constants using 'manifest' keyword?
Derek Parnell
derek at psych.ward
Fri Dec 21 15:14:26 PST 2007
On Fri, 21 Dec 2007 18:49:08 +0100, "Jérôme M. Berger" wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Matti Niemenmaa wrote:
>> Derek Parnell wrote:
>>> 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;
>>> }
>>
>> Alright, I'll bite. What /is/ manifest meant to mean here?
>>
> I'd bet for a compilation error ;) A correct declaration would be:
>
> manifest
> {
> int Foo = 42;
> long Bar = 4242;
> }
LOL ... it was 2:30AM when I wrote that.
What I had in mind was the apparent similarity in syntax structure between
struct S
{
int Foo = 42;
long Bar = 4242;
}
and
manifest
{
int Foo = 42;
long Bar = 4242;
}
But overall, 'manifest' is better then an overloaded 'enum' and, as I
expect what will happen, 'manifest' will be in very common usage. It also
helps in visually distinquishing the D programming language from C/C++.
It will do.
--
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
More information about the Digitalmars-d
mailing list