@disable this for structs
Remo
remo4d at gmail.com
Fri Feb 28 05:32:12 PST 2014
On Friday, 28 February 2014 at 13:23:51 UTC, Dicebot wrote:
> 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.
Right now I do not really miss namespacec in D.
I like modules in D.
What I hate already are problems with structs and ctors.
Most time while porting C++ code to D I spend a lot of time to
resolve all the problems that happens because of struct ctors.
If I forget to do this then it still compiles but does not work
at all...
More information about the Digitalmars-d-learn
mailing list