Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not using this context so much #67

Open
ianstormtaylor opened this issue Jan 12, 2014 · 4 comments
Open

not using this context so much #67

ianstormtaylor opened this issue Jan 12, 2014 · 4 comments

Comments

@ianstormtaylor
Copy link
Contributor

i'm not a fan of relying on this inside iterators because it feels really magicky, and i think its one of the bad parts of jquery.

for some of the cases, it's already duplication, so we could easily just invoke the functions directly and let it be window like normal

for other cases, i'd propose a signature of el, i, list if we decide that el is the default people want. otherwise list, el, i if we think that list is more frequent

what do you guys think? open to suggestions, just feels really bad doing this.hasClass inside filter and such

@yields
Copy link
Member

yields commented Jan 12, 2014

+1 i prefer doing list.reject(el -> el.hasClass('woot'))

@chemzqm
Copy link
Contributor

chemzqm commented Jan 12, 2014

+1 this looks wired inside a iteration, and I would prefer it works like the original Array with el, i, list passed, make the el as an instance of List would be my life easier.

@matthewmueller
Copy link
Member

i'm fine with this change, but is removing it and having it just be window to encourage people not to write bad code?

@tj
Copy link
Member

tj commented Jan 29, 2014

yeah we've inherited a few bad things from jquery, parity is nice when it's a non-wtf thing, but I'd rather ditch the weird sides of jquery so people don't think this lib is supposed to maintain parity

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

No branches or pull requests

5 participants