July 30, 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.
July 31, 2013
On Tuesday, 30 July 2013 at 16:48:42 UTC, Vladimir Panteleev wrote:
> 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.

You need to load templates from disk. I'm thinking about Adobe products, though I don't know why they're so huge and why they start so slow.

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

Do you mean referring to the mixin doesn't include mixins nested into it?
July 31, 2013
On Wednesday, 31 July 2013 at 08:04:35 UTC, Kagamin wrote:
> On Tuesday, 30 July 2013 at 16:48:42 UTC, Vladimir Panteleev wrote:
>> 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.
>
> You need to load templates from disk.

Loaded from a memory-mapped file, to be precise. Linkers can optimize the layout of your program to put rarely-used templates somewhere where they won't be loaded from the disk until they're needed. (Do you think a 500MB executable installer gets loaded into RAM entirely before it can run?) But it's not like there will be a thousand XML parser instantiations in the same program.

> I'm thinking about Adobe products, though I don't know why they're so huge and why they start so slow.

I doubt it has anything to do with template bloat.

> Do you mean referring to the mixin doesn't include mixins nested into it?

Why would you nest mixins? That's the worst of both worlds.
1 2 3
Next ›   Last »