...which sounds reasonable enough: websites that are up should keep working. And there's no doubt that browsers adding
array.flatten(), with a different function signature than the ancient MooTools'
array.flatten(), will break sites running the ancient MooTools.
Why we can't have nice things
But it seems attitudes have changed: Brain Terlson - one of the editors of the ECMAScript standard and
smoosh()-or-similar proponent - asked. And didn't get the answer he was expecting:
Adding Array.prototype.flatten to JS may break the web. The proper fix is to:— Brian Terlson (@bterlson) March 7, 2018
Who would be affected by browsers adding .flatten()?
I agree that HTML and CSS should keep working in new browsers (there are some exceptions, like the defunct
So who's running a live website based on an 8 year old version of MooTools? There are other severe bugs that affect vintage MooTools. There will have been bugs discovered with the site itself too. A site that old probably doesn't have a Content Security Policy and would likely be vulnerable to XSS attacks (yes, some libraries try and escape user entered dynamic content, no, these don't catch everything). It might need Flash, which won't work at all anymore.
Outside the JS layer, we have backend vulerabilities, HTTPS now being required, Debian's non-random keypairs and Spectre on CPUs. Every layer breaks all the time. Every layer needs maintenance.
What if you can't maintain a site? A good idea is to shut it off. It likely doesn't work (have you checked recently?) and an unmaintained site is typically broken and used as launch point for attacks on users (via XSS) or other web sites (via DDOS attacks).
splice() does. I don't want to be explaining in 2028 that
sploosh() (or whatever it is) was chosen because a small group of people who didn't want to maintain their websites were chosen as being more important than everyone learning now.
What does the web think?
Here's what John-David Dalton (creator of underscore) wrote:
Array#flatten and Array#flatMap being renamed to Array#smoosh and Array#smooshMap because of an 8yo version of MooTools is pic.twitter.com/dbuYJ9TkgL— John-David Dalton (@jdalton) March 7, 2018
In case it's vague, check John's comments in the thread to see what he thinks.
Finally, an old quote from Brian LeRoux from the JS Foundation (and also a friend and the creator of PhoneGap). I can't remember what Brian was talking about - it wasn't smerking - but I think it's relevant here.