jashkenas / backbone

Give your JS App some Backbone with Models, Views, Collections, and Events
http://backbonejs.org
MIT License
28.1k stars 5.39k forks source link

Clean up misguided legacy changes #4266

Open jgonggrijp opened 1 year ago

jgonggrijp commented 1 year ago

In the distant past there have been changes of questionable value, often breaking, often complicating and/or pessimizing the code, and sometimes removing pre-existing tests. I consider #3843 a good example of this type of change. I'm sure that example is one of many, because I encountered similar changes when I triaged the open issues and pull requests in stage 1 of #4244. In addition, I have seen many similarly unfortunate changes in Underscore, often (but not always) by the same author.

Many small changes make a big difference, and I suspect that hunting down and reverting as many of these changes as possible would slim down and speed up the code considerably. Unfortunately, this is easier said than done, for three main reasons:

To address this, I would like to do the following:

  1. Curate a list of changes that should be reverted, in the current issue ticket. This is, of course, subject to discussion. Suggestions for candidates are very welcome.
  2. Postpone reverting the changes until a major version update is near.
  3. Revert the changes from the list in the reverse order of application, on a future branch.
  4. Base the new major version on the future branch.

Candidate list (to be updated as the discussion progresses):

jgonggrijp commented 1 year ago

3758, while by itself never merged, is a treasure trove for discovering this type of change. Right in the opening post, it already lists #3659, #3644 and #1407. When I get to it, I want to follow those references in order to potentially find even more of those.