Skip to content

Conversation

danfooo
Copy link
Contributor

@danfooo danfooo commented Oct 11, 2012

...e are slow

@hzr
Copy link
Contributor

hzr commented Oct 11, 2012

Feels slightly over-engineered to me. Why not just generate the classes in the corresponding template?

@p01
Copy link
Contributor

p01 commented Oct 11, 2012

I have to agree with @hzr, must be possible to add the corresponding classes in the templates. I do similar things in the templates of the new Resource Service

@danfooo
Copy link
Contributor Author

danfooo commented Oct 11, 2012

In https://github.com/operasoftware/dragonfly/pull/109/files#L4R179 for example, different rows come together from different templates. You'd pass counts between several map functions, and repeat the code that checks even/odd. Even when it's just one template function used with map, sometimes you return [], so you couldn't work with the index that's passed. Okay, I admit that last one might be a theoretical problem.

@p01 if you do a similar thing, doesn't that mean it's useful to do it in one common place instead? I don't think it's expensive either.

Edit: Github kills my link here for some reason, I meant to point to a specific line https://github.com/operasoftware/dragonfly/pull/109/files#L4R179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants