structs, classes, interfaces - Part III, Solution

Sean Kelly sean at f4.ca
Sat Sep 1 09:51:23 PDT 2007


Martin Hinsch wrote:
> On Sat, 01 Sep 2007 09:34:31 -0700, Sean Kelly wrote:
> 
>> Martin Hinsch wrote:
>>> I have no illusions concerning the probability of this making it into D.
>>> Still I think it's a nice idea ;-) and I would be really interested in
>>> hearing what people think about it.
>> To sidestep the issue for a moment, do templates solve your problem for
>> arrays of structs, or is there some reason you need run-time polymorphism?
> 
> I feel a bit dumb but I have no idea what you mean... The basic problem is
> that I want to have a proper OOP type but with all the speed and memory
> advantages value semantics offer PLUS the option of painlessly "upgrading"
> it later to something even more OOPishy (i.e. rt-polymorphism, reference
> semantics).

See my other post "implicit template function overloading broken?" for 
an example.  However, templates limit polymorphism to compile-time.


Sean



More information about the Digitalmars-d mailing list