Closed ianstormtaylor closed 11 years ago
sorry, i realized this is not so simple. if people are calling it destroy
as an action, they'd expect to bind to the destroy
event as well, so in this case an alias is great. one or the other has to be chosen.
i personally think destroy
is the better call, since remove
implies removing from something but there isn't really a something. just like there's no model.add
call, model.remove
doesn't make sense either.
could be a name other than destroy
though if TJ needs a word without y
in it :p
what do you guys think?
how did you know it was the y
?!
I like remove personally be because it's not as "harsh", if you're doing soft deletes on the backend etc, destroy is RAWR
ohhh haha magic
what kinds of things are you doing soft deletes for? (just dont know the use case) should the person using the model even know that the delete is "soft"?
semantically remove
is an action that always needs a noun. you always remove something from something else, which is why it makes a lost of sense for collection
or list
or set
. but for model
its unclear
yeah true, i'm down with .destroy I can think of anything better without the y
ill PR later today
— ian storm taylor
On Friday, June 7, 2013 at 8:28 AM, TJ Holowaychuk wrote:
yeah true, i'm down with .destroy I can think of anything better without the y
— Reply to this email directly or view it on GitHub (https://github.com/component/model/pull/36#issuecomment-19114009).
I prefer
destroy
as it mirrors what Backbone calls it, and just feels more right thanremove
. I feel like having an alias is pretty low cost, and it's not going to ever be used for anything else since it would be too ambiguous.