Break the web.

Favoring a bigger future over a tiny past.

By Mike on 9th Mar 2018

So JavaScript's array.flatten() might get called, er, array.smoosh() because some websites are running an 8 year old version of MooTools. The reason is this oft-quoted phrase:

Don't break the web.

...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

We've had a similar choice before: array.includes() in ES2016 was originally going to be called array.contains() but had a similar conflict - also with MooTools.

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

OK, smoosh is a bad name - it's informal, and not standard English. But it's presented as one example of a rename here, not the only one. JavaScript developers still chose 'Break the web'.


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 <keygen> and <blink> elements). But is it reasonable to expect software - including JavaScript - to keep working without maintainance?

Before being a JavaScript developer I was system administrator, where the concept of entropy is accepted as fact. Anything will, eventually decline into disorder, unless there's some kind of intervention. In other words: everything needs maintenance to keep working.

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.

The idea that anything works forever without maintenance is wrong.

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).

Who would be affected by JavaScript using .smoosh() to flatten arrays?

There are a thousand times as many current JavaScript developers who would like good names for things, as people who have web content running on 8 year old versions of MooTools.

But it's greater than that: any living language needs to get the attention of new developers. It's likely that JavaScript will still exist in 2028.

There are a thousand times as many potential future JavaScript developers as there are present ones.

...snd having sensible names is part of making JavaScript attractive to them.

I've been doing JavaScript for around a decade now and I still have to look up exactly what 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.

Let's not repeat this for another generation of JavaScript developers.

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

— 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.

"People say don't break the web - but the web is a self healing mechanism"

Any website with staff who understand JavaScript can easily update their old MooTools site - this doesn't required project-specific knowledge, just a web developer. Meanwhile a thousandfold people can enjoy a language with good names.

Mike MacCana, founder at CertSimple.

CertSimple makes EV HTTPS fast and painless.

An EV HTTPS certificate verifies the company behind your website. But getting verified is a slow painful process. CertSimple provides EV HTTPS certificates 40x faster than other vendors. We check your company registration, network details, physical address and flag common errors before you pay us, provide verification steps specific for your company, update in realtime during the process, and even check your infrastructure to help you set up HTTPS securely.
Verify your site now!