Hacker News new | ask | show | jobs
by kreetx 1844 days ago
How about deprecating that for a few years then? Doesn't seem good to keep the behavior, given that it will also be confusing in the future.

But perhaps we just don't know enough, and they will add the `at`, and at some point actually do bind `arr[index]` to use the implementation of that function?

3 comments

There's a large body of existing code out there, some of which might rely on the current behavior but never be updated. I doubt any length of deprecation period would solve this issue.

Instead, adding .at() allows having the new feature now, and in a way that's possible to polyfill for backwards compatibility.

The web as a platform is the most elaborate and epic showcase at not breaking backwards compatibility in the entire history of computing.

In the face of disasters like Python 2->3 and Apple M1 macs no longer being able to play Starcraft Remastered, the web is an aspirational beacon.

Let’s keep it going.

Isn't Windows even more epic?
Windows is very epic, but they did break compatibility a few times: the new driver model since Windows 7 (?) for example.

The Web probably has a longer history of not breaking things, but also has a smaller feature set to keep track of than Windows.

All in all, very hard to compare. But both undoubtedly epic.

The new driver model is Vista-era, I think.
For all the (often deserved) hate Windows gets, in particular the user space API’s, I still find the chaos incredibly exciting and an invitation to hack together all sorts of strange things in strange manners. I’m sometimes surprised by the levels of backwards compatibility and the “obsolete” technologies that still work fine.
You might well be right! Would be fun to see them go head-to-head over the title.
The success of Windows to maintain backwards comparability is probably some of the inspiration for the people working on JS. Windows has demonstrated that it's possible to maintain backwards compatibility for decades.

It's not easy, and it certainly leads to annoying platform quirks, but it is possible.

How would you deprecate it? There's tons of browsers and JS runtimes out there and they all adopt features at different speeds. Undoubtedly some browsers would never adopt the new feature, which means websites will simply break, and the web will become even more fragmented than it already is.