#SmooshGate

  Рет қаралды 11,279

Chrome for Developers

Chrome for Developers

Күн бұрын

Пікірлер: 46
@whosdr
@whosdr 6 жыл бұрын
Reminder that String.prototype still contains 'link, 'anchor'', 'bold', 'italics', 'big', 'small', 'blink', 'fontcolor', 'fontsize', 'sup', 'sub' and 'strike', all tags deprecated in HTML5. (and some possibly HTML 4) I wonder how many sites rely on these and are actually still visited by users.
@Scio_
@Scio_ 6 жыл бұрын
Honestly :raises pitchfork: let the people who use sites that use libraries that mess around with prototypes suffer the consequences.
@dassurma
@dassurma 6 жыл бұрын
But, as Jake says in the video, that wouldn’t punish the developers but rather the _users_ of those sites.
@Scio_
@Scio_ 6 жыл бұрын
I wasn't entirely being sincere (hence the pitchforks:) but I _do_ want to punish said users in my mock indignation at this madness! All the solutions are messy, and the breaking one appeals the most to me.
@ColinRichardson
@ColinRichardson 6 жыл бұрын
I genuinely think, call it flatten. Then sites break, sites get updated, sites work again.
@holliswu
@holliswu 6 жыл бұрын
Colin Richardson That won't work. Users will just yell THE NEW FIREFOX/CHROME BROKE THAT SITE. DOWNED YOUR BROWSER FOR A FIX!
@AndrewBanchich
@AndrewBanchich 6 жыл бұрын
Surma meh
@MaxArt2501
@MaxArt2501 6 жыл бұрын
I think a small part of developers thought that smoosh was actually going to be final - it has never been a possibility, to be fair. The source of rage is that Mootools and a lot of legacy libraries are exactly "why we can't have nice things", like decently named methods, or we have dirty hacks like document.all, as you mentioned. It's frustrating and kind of a slippery slope.
@FrameDrumAndFlute
@FrameDrumAndFlute 5 жыл бұрын
So that's why the Array method is Array.prototype.flat? not flatten?
@wmhilton-old
@wmhilton-old 6 жыл бұрын
This is fascinating! Thank you for explaining this.
@JamesCoyle95
@JamesCoyle95 6 жыл бұрын
I personally feel that we shouldn't let anything come in the way of a well written and consistent spec. I don't get why we couldn't just have some sort of doctype for javascript so you could define the version your project is using and then certain features that may cause issues like this can be disabled and trigger a warning in the console.
@jsilvermist
@jsilvermist 6 жыл бұрын
#BreakTheWeb!
@jakearchibald
@jakearchibald 6 жыл бұрын
If video isn't your thing, here's an article covering the same details developers.google.com/web/updates/2018/03/smooshgate.
@DavidsKanal
@DavidsKanal 2 жыл бұрын
Video is my thing.
@AkashSunnyChowdary
@AkashSunnyChowdary 6 жыл бұрын
Guys! Please, more volume.
@CompTutts
@CompTutts 6 жыл бұрын
Is it just me or it's time to release like a new much cleaner version of JS that removes the exceptions but in order to use it you have to declare in a way similar to "use strict"; "use new js"; or ; and array flatten will be called flatten, stay enumerable, but will only be available in the new JS version, I believe this will result in a much more performant browser experience
@samdenty
@samdenty 6 жыл бұрын
But what about browsers that don't support 'use new js'? You're essentially breaking compatibility in order to use new features, which is the reason tools like babel exist.
@CompTutts
@CompTutts 6 жыл бұрын
Well then and as a fallback which we can setup with babel/eslint to know it works Only sad part will be that in chrome there is and we'll have to use something like which can be kind of tedious
@aduh95
@aduh95 6 жыл бұрын
What about do that with type="module"?
@CompTutts
@CompTutts 6 жыл бұрын
Antoine du Hamel we can't, we'll break 0.0000001% of the web
@aduh95
@aduh95 6 жыл бұрын
Nah, I could bet a fair amount of money that absolutly no website is using MooTools within a ES2015 module. But you never know ^^ So what about type="es2019" then?
@gustavon.2300
@gustavon.2300 6 жыл бұрын
Is it shmoosh or smoosh? Thumbnail is different from the title.
@omri9325
@omri9325 6 жыл бұрын
Just call it as an emoji, I bet no library could break from that. I hope I'm not wrong :|
@silentobserver9095
@silentobserver9095 4 жыл бұрын
I'm quite sure jQuey V2 will use emoji...
@malipetek
@malipetek 5 жыл бұрын
I did not get why it has to break web, why not do this: Object.defineProperty(Array.prototype, 'flatten', Array.prototype.flatten || moo.Flatten)
@dwighthouse
@dwighthouse 6 жыл бұрын
Have the considered making new standards not modify the prototype either, and have a standard function library that is imported the same way as any other library? `const { flatten } import 'js.std'; const flattened = flatten(array);` Or what about attaching them as methods on an object named using a currently unused JS reserved word like 'native'? So you could do `native.flatten(array);` You don't get the nice semantics of attaching methods on prototypes, but if it's bad practice for other libraries, it could conceivably be bad for future standards that conflict with existing standards.
@jakearchibald
@jakearchibald 6 жыл бұрын
Give me the bind operator then maybe we can talk.
@dwighthouse
@dwighthouse 6 жыл бұрын
Sounds good to me. 👍
@jincyquones
@jincyquones 5 жыл бұрын
There is a TC39 proposal for a Javascript standard library, currently in Stage 1. Seems promising, but it's gonna be awhile till it lands, no matter what.
@promatik
@promatik 6 жыл бұрын
Ok, since I'm not English native, I googled "shmoosh", and the first result is the urbandictionary, and the definition says; "verb; to consumate, f**k, have sex". How can this even be an option? :)
@andrewtfluck
@andrewtfluck 6 жыл бұрын
Squash, crush, compress, are some other ones
@andrewtfluck
@andrewtfluck 6 жыл бұрын
Smoosh sounds the best though lol
@loquek
@loquek 6 жыл бұрын
It was always known as a bad practice, for this very reason, so why shouldn't it happen? Is Mootools really going to force the naming convention of the future by executing bad practice? I am sure in the history of the web browser updates have broken something previously? On the flip side, I think it is very nice and considerate to consider renaming it to ensure some old popular sites work, despite this. Edit: oki I should have watched all of the video before commenting, I like Surma's idea : ) maybe `Moomode`? : D
@sarunint
@sarunint 6 жыл бұрын
SmooshMap
@stasshakirov2943
@stasshakirov2943 6 жыл бұрын
array.smooshed
@dassurma
@dassurma 6 жыл бұрын
First.
@jakearchibald
@jakearchibald 6 жыл бұрын
Cheat.
@RakshakHegde
@RakshakHegde 6 жыл бұрын
Lul
@AceixSmart
@AceixSmart 6 жыл бұрын
Lol..u time travelled?
@andrewtfluck
@andrewtfluck 6 жыл бұрын
What the
@cgijoe-jhuckaby
@cgijoe-jhuckaby 6 жыл бұрын
You mean Array.prototype.first ;)
@nadirali-wy1cl
@nadirali-wy1cl 5 жыл бұрын
same to you
@fnvtyjkusg
@fnvtyjkusg 6 жыл бұрын
How fun!
@squirrelmanish
@squirrelmanish 6 жыл бұрын
I propose *Emflatten*
Class-based Tree Shaking - HTTP203
12:16
Chrome for Developers
Рет қаралды 26 М.
JavaScript for-loops are… complicated - HTTP203
14:17
Chrome for Developers
Рет қаралды 106 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Work Life Balance - HTTP203
9:10
Chrome for Developers
Рет қаралды 13 М.
What's New in Chrome DevTools - HTTP203
13:08
Chrome for Developers
Рет қаралды 8 М.
PWA Starter Kit with Monica Dinculescu - HTTP203
11:25
Chrome for Developers
Рет қаралды 19 М.
What's new in JavaScript - HTTP203
12:35
Chrome for Developers
Рет қаралды 22 М.
Share Target - HTTP 203
14:49
Chrome for Developers
Рет қаралды 15 М.
3X-UI v2.4.9 & v2.4.10 - XHTTP: stream one
14:57
MHSanaei
Рет қаралды 5 М.
Web Security - HTTP203
10:27
Chrome for Developers
Рет қаралды 9 М.
Introduction to Fedora Linux GUI
9:17
TheCiscoNoob
Рет қаралды 115 М.