Phango - questions

Walter Bright newshound1 at digitalmars.com
Mon Nov 19 00:49:01 PST 2007


Bill Baxter wrote:
> Asking for a feature where class package.Options.Options can be accessed 
> as just package.Options seems a decent idea at first -- the same trick 
> works for templates after all -- but I don't think it would pan out. 

You're right, templates do that, but it's a risky feature because it's 
essentially a special case hack. Anytime you do something like that, it 
can have subtle, unintended consequences.

My dislike of it has been one of the motivators for changing the syntax:

template Foo(T)
{
     class Foo
     {
	...
     }
}

has become:

class Foo(T)
{
     ...
}

where the hack is not necessary.



More information about the Digitalmars-d mailing list