kitsonk/dojo — comment on commit ba9465fcd1207b12a056a8f91ff76f27d976c6f9
File: parser.js line 586
By kitsonk:

On 1 February 2012 04:09, wkeese <
reply@reply.github.com
> wrote:

> Cool. BTW my rationale for the suggesting using a single list for
> data-dojo-type and data-dojo-mixin was that it would be convenient for both
> your new code (doing the require() call) and also for _getCtor(), which
> needs a key to lookup cached values. Currently it seems like _getCtor()
> is doing something a little confusing with nested caching, first level
> data-dojo-type and second level data-dojo-mixins, and I thought a single
> lookup key like "dijit/Dialog,dijit/Mixin1" would be more straightforward.
>
>
Yes, I realised the same thing. That is why I didn't do it right away,
because I needed to make sure I could properly do _getCtor(). It is
confusing. My morning mind I think just flipped on and realised how to do
it.

Of course the counter-argument is that _getCtor() will need to split the
> list into the first part and the remainder when there isn't a cached value.
>

Yes, but that should be trivial and will likely get rid of the recursion.
One thing I have learned is that in a lot of ways recursion, while elagent
from a code perspective doesn't perform all that well in JS.