Low-overhead components

Vladimir Panteleev vladimir at thecybershadow.net
Tue Jul 30 09:48:41 PDT 2013


On Tuesday, 30 July 2013 at 15:57:50 UTC, Kagamin wrote:
> On Sunday, 28 July 2013 at 21:03:43 UTC, Vladimir Panteleev 
> wrote:
>> Why? The difference is one indirection. Are you referring to 
>> the impact of template bloat and code cache misses?
>
> bloat

In most cases, only one template instance will be "hot" at one 
time, so I don't think it would be a problem in general.

>> With mixins, each layer is declared separately, and you can 
>> access it directly.
>
> Don't you fear namespace pollution? You probably don't want to 
> call arbitrary methods on xmlParser and later try to figure 
> out, what did you call exactly.

If xmlParser would be a mixin, referring to it directly could 
only refer to the symbols declared in the mixin itself.


More information about the Digitalmars-d mailing list