Idea for getting rid of "static" on methods

Matti Niemenmaa see_signature at for.real.address
Mon Dec 3 06:44:07 PST 2007


Christopher Wright wrote:
> Christopher Wright wrote:
>> Matti Niemenmaa wrote:

<snip>

>>>         return assert(delegate void(lazy byte, ref cdouble, inout
>>> cfloat, creal,
>>> dchar, double, float, idouble, ifloat, ireal, long, real, ubyte,
>>> uint, ulong,
>>> ushort, wchar){});
>>>     }
>>> }
>>> alias int /+ end +/ x;

<snip>

>> You could've done 'alias __traits(something...) identifier' instead,
>> for  one extra.
> 
> My mistake; that wouldn't actually increase it, if you're only counting
> globally reserved keywords.

Sure it would. "int" can be moved into that delegate and then we'd have __traits
in addition to everything I originally used.

> If you could have an anonymous template, you could do:
> mixin (template () { module foo; })!();

Yeah, anonymous templates would chop off a few keywords off the "left-over"
list. I'm not sure if putting module in a template like that would work, though,
but there are plenty of other options if it doesn't.

-- 
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi



More information about the Digitalmars-d mailing list