mxriverlynn / backbone.picky

selectable entities as mixins for Backbone.Model and Backbone.Collection
129 stars 29 forks source link

Note about the method name "select" #35

Open rek opened 10 years ago

rek commented 10 years ago

From the doc:

The Picky collections override the method select on collections. At this point, I can't think of a better name for specifying a model has been selected. Once I find a better name, the API will change.

Instead of select, has pick been considered?

It seems to me like pick is only used on Backbone.Model currently.

tony commented 10 years ago

@rek : I was about to suggest that too, underscore has dibs on pick, so there is still ambiguity.

choose / unchoose / chosen / unchosen

tony commented 10 years ago

@derickbailey : choose etc. isn't my favorite, but a quick search through http://backbonejs.org/docs/backbone.html and http://underscorejs.org/docs/underscore.html show it's up for grabs.

hashchange commented 10 years ago

@rek @tony Another avenue which doesn't break existing code is to keep the name select and overload it. That's what I did in my own fork of Backbone.Picky - check out the docs and the code if you like.