Polymorphic recursive class
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jul 13 02:03:18 PDT 2015
On Monday, 13 July 2015 at 08:12:28 UTC, Jack Applegame wrote:
> On Monday, 13 July 2015 at 08:05:05 UTC, thedeemon wrote:
>> On Monday, 13 July 2015 at 06:31:33 UTC, Jack Applegame wrote:
>>
>>> But is there any reason why D can't follow MLton way -
>>> instantiate a class type template ONLY when a constructor of
>>> given class is used?
>>
>> Because if constructor isn't used doesn't mean the class isn't
>> used: there can be some static methods or other stuff.
> Ok, lets instantiate it only when we use some stuff.
Why does the spec needs to be made more complex for some code
that you wouldn't be able to use anyway ?
Just use static if and be done with it.
More information about the Digitalmars-d
mailing list