@disable this for structs

Dicebot public at dicebot.lv
Fri Feb 28 05:23:49 PST 2014


On Friday, 28 February 2014 at 12:52:38 UTC, Remo wrote:
> On Friday, 28 February 2014 at 11:59:40 UTC, Dicebot wrote:
>> On Friday, 28 February 2014 at 01:16:41 UTC, Mike Parker wrote:
>>> Ideally, I'd love for the compiler to pick up on this idiom 
>>> and not generate any typeinfo in this situation.
>>
>> Ideally one should use modules as namespaces :P
>
> Ideally D should have build in namespaces.
>
> Using class to mimic namespace, but then all the functions are 
> virtual per default ?

No. By design namespace is a module. You don't use classes for 
namespaces, you create more modules. One may not like it but it 
is how D module system was created and it was intentional.


More information about the Digitalmars-d-learn mailing list