DEV Community

Discussion on: Smooshing JavaScript

Collapse
 
neonhomer profile image
Kramer

I haven't heard of or thought about MooTools for a very long time (thanks to jQuery).

Seems odd that they would rename a method based on an old library using.

Collapse
 
kayis profile image
K

I'm still not sure if they're serious...

Collapse
 
nickytonline profile image
Nick Taylor

It was mainly a joke I think, but people let it escalate.

I think it made people more aware of TC-39 though.

Thread Thread
 
nickytonline profile image
Nick Taylor

They already have t-shirts 😂

Thread Thread
 
ben profile image
Ben Halpern

🙃

Collapse
 
maxart2501 profile image
Massimo Artizzu • Edited

They are.
Of course MooTools' usage in new projects is negligible nowadays, but it wasn't in the past. And there are quite some old sites that still use it.

MooTools had this terrible practice to extend native prototypes. I'm still surprised that it actually gained some favor, but the worst part is that it's been part of Joomla at the time, so it ended up in sites whose maintainers didn't always get to make an educated choice (like jQuery).

In the end, yes, there's a non-negligible amount of sites that would break. Should we let those sites break? Keep in mind that it's not always about abandoned websites, but maybe also sites of small companies or commercial activities that don't have the resources to update their sites.

But alas, we don't have data to back up that.

I still think that letting the TC39 settle for includes instead of contains (because of MooTools, again!) was a slippery slope, and this new issue proved me right.

Now, we do have alternative decent names (like flat or squash), as smoosh wasn't really a serious proposal (very inappropriate from Ficarra, anyway). But I think the adage "We shouldn't break any site when introducing new features" is just an impossible task for TC39. It's reasonable to think that every new feature has a non-zero impact on some existing website/webapp.

I'd like to see real-world data, though.

Thread Thread
 
dinoboff profile image
Damien Lebrun

The problem is not with the TC39 per se. TC39 only reflects the consensus of major vendor; what the point of a standard that will never be implemented; e.g. Array.prototype.values which was turned off in chrome and firefox because it breaks some outdated CMS.

Collapse
 
daniel15 profile image
Daniel Lo Nigro • Edited

Seems odd that they would rename a method based on an old library using.

One of the major design points of the web as a platform is that old sites shouldn't break. While MooTools isn't as popular these days, it was one of the more popular JavaScript libraries many years ago, and a lot of sites still use it.

The issue with MooTools is that it prefers the built-in method (if one exists) over its own method. If it always overwrote the native method, we wouldn't have issues like this. This is also why "ponyfills" never use the native implementation of a function, even if available.

I haven't heard of or thought about MooTools for a very long time (thanks to jQuery).

MooTools was always better than jQuery, though. jqueryvsmootools.com/