Cumbersome overloading of mixed-in functions
nobody
nobody at mailinator.com
Sun Aug 20 00:58:38 PDT 2006
kris wrote:
> Jarrett Billingsley wrote:
>> Say I want to add a bunch of (virtual) methods to a class. All these
>> methods do very similar things, just on different types. Hmm, sounds
>> like a job for a template.
>
> Better to do it all manually and save yourself the grief. Mixin should
> perhaps be removed from the language until such time that it works in a
> reasonable manner :(
Just a little while ago I posed a question to D.learn about implementing all the
permutations possible of RGB, HSL, RGBA and HSLA. The numbers from that post:
3! + 3! + 4! + 4! = 60 types
(3! + 3! + 4! + 4!)^2 = 3600 opAssigns
Certainly manually is not really an option here.
More information about the Digitalmars-d
mailing list