PhobosWatch: manifest => enum
Bruce Adams
tortoise_74 at yeah.who.co.uk
Fri Dec 28 13:21:46 PST 2007
On Fri, 28 Dec 2007 17:32:32 -0000, Steven Schveighoffer
<schveiguy at yahoo.com> wrote:
> "Janice Caron" wrote
>> I don't see why any of this isn't possible. Maybe that's because I'm
>> dumb and I'm missing something obvious, but I'm baffled as to what it
>> is. And if I /haven't/ missed anything, then we don't need a new
>> keyword /at all/ - be it enum, manifest, or anything else.
>>
>
> I don't disagree with you :) I'm merely clarifying Walter's gripe.
>
> I think there may be a better reason why your idea wouldn't work, but I
> am
> not sure how the compiler is implemented, so I can't really say much.
> However, it might be a problem when you are defining constants in one
> module
> to be used in other modules. How does the compiler know that those
> constants won't have their address taken somewhere else? When the
> compiler
> creates the object file, it has to assume since the symbol is public, it
> can
> have its address taken, no?
>
> If you had a specific D linker, you could modify the linker to take this
> into account, but that is not the case today.
>
> -Steve
>
Another possibility is you might want a way to assert that something must
never
use any storage. However, that seems a little bizzare.
More information about the Digitalmars-d
mailing list