4 ms·
The complaint is that type coercion exists at all. It solves no problems and creates several out of thin air. Or are you arguing that ceteris paribus you'd rat
by qsort 1y ago
The complaint is that type coercion exists at all. It solves no problems and creates several out of thin air.
Or are you arguing that ceteris paribus you'd rather not have the language throw an error or just propagate undefined?
- th0ma5 1y agoIn the context of the time it was created it was fine to mess with and having an enlightened view from the future can't negate that even though I understand the complaint.
- shakna 1y agoJS has had how many breaking changes since then...? They've transitioned to the future. Why is it still here today?
- josephg 1y ago> JS has had how many breaking changes since then...? What breaking changes has JS ever had? Its an incredibly stable language.
- shakna 1y agoOk, lets reword that. JS has breaking changes in browsers or node at least once a year. If the platform can continuously shift, in an ecosystem that rots faster than my veggie garden, can we not have more sensible systems in place?
- josephg 1y agoYou’ve still failed to give any examples of these breaking changes. Old websites still work great. I’ll try again. What breaking changes does JavaScript make? What are you talking about?
- shakna 1y ago8 months ago, Chrome rewrote how URLs work [0]. Which, unsurprisingly, affects the `URL` constructor in JS. We have had so many APIs vanish from any context to "secure contexts" only. Like AppCache, or workers, or the clipboard. Entire APIs like XMLHttpRequestProgressEvent have vanished entirely. In fact, there is a lot of obsolete features. Enough that there's a list. [1] You can't use global or source with a RegExp anymore. You can't use the arity property on a function anymore. `Object.prototype.eval` is dead. `Object.getNotifier` is dead. `Date.prototype.toLocaleFormat()` is dead. Old websites have been broken. Repeatedly. Or we wouldn't have, say, blogspam on why mixed content suddenly broke some Wordpress systems. Yes, these are good changes. They're more secure. However, we're willing to break some sites in the name of security, but unwilling to fix ambiguous parsing for the programmer? [0] https://news.ycombinator.com/item?id=41912354 https://news.ycombinator.com/item?id=41912354 [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...