3 ms·
It has to do with certain behaviours of RegExp objects, such as the `lastIndex` property, as well as consistency with `matchAll`. There was a lot of discussion[
by snek 7y ago
It has to do with certain behaviours of RegExp objects, such as the `lastIndex` property, as well as consistency with `matchAll`. There was a lot of discussion[1] about what should happen with a regex that doesn't have /g, and in the end the most consistent choice was to just disallow them entirely.
[1]: https://github.com/tc39/proposal-string-replaceall/issues/16 https://github.com/tc39/proposal-string-replaceall/issues/16
- dmitriid 7y agoThe irony in that discussion regarding behavior of matchAll: "Once something has shipped in browser's we can't change it". Chrome: deprecating and removing Custom Elements V0 in 2020.
- explodingcamera 7y ago*V0, this has always been explicitly unstable
- vimslayer 7y agoAlso, Custom Elements is in the area of W3C, not TC39, I believe. There could be different rules and people involved. Although I'm sure they'd like to avoid breaking the web too.
- dmitriid 7y agoIndeed, and that's the point I failed to make. TC39 is rightfully concerned about not breaking the web. They are very mindful even if features that have reached stage 3 (because by this time everyone is already using them). Browser implementors though... They take a much more callous approach.
- dmitriid 7y agoAnd used by the biggest websites and projects on the Web (Google's own YouTube and AMP until very recently). How many more websites are using it because it was out, and implemented?
- olliej 7y agoBecause no one else shipped it - “V0” was a terrible attempt at a spec invented by the chrome team and shipped without meaningfully talking to the rest of the community. This “throw a pile of terrible features at the wall and see what sticks” while berating other browsers for not also implementing the badly designed and poorly specified specs is pretty much part and parcel of chromes embrace+extend+extinguish approach to “open specs”.