JS standard lets developers put stuff on prototypes, that’s game over, NO LANGUAGE UPDATE should EVER put stuff there, period
JS standard lets developers put stuff on the global window object. So does that mean no new globals can be added to the language ever?
I wish the discussion here wasn’t about what to do in this case or that case but how to change the language in a fundamental way such that this entire class of issues cannot happen in the future.
I have many, many issues with both the JS language and the JS ecosystem (and community!), but this is not the hill this author should be dying on.
JS gave people the power to modify the base prototypes of the standard library. Anybody with any experience should feel gross when they monkeypatch core bits of their language. The cost for doing this is “hey, if the language changes, your monkeypatches might behave incorrectly or get invoked unexpectedly”.
We don’t get to have a competent standard library if we have to unconditionally respect the favelas of devs who decided to add things in places that were obviously not theirs.
(Also, the amount that this author argues through other examples, like doctors or website layout or whatever, instead of sticking to the core domain is really tiresome to me.)
As mentioned by friendlysock, every description of monkey patching I’ve ever seen warns that it may cause problems with updates. Any time somebody modifies an object they don’t own, they’re taking a risk.
The author here is talked about the latest smoosh debate without naming directly, but this isn’t the first time JS has added functionality, or broken backwards compatibility, Here’s an example from 2008. Developers survived this upheaval then, and they will survive it now.
The author also mentions the long-standing Java/Javascript flame wars, but anybody can find arguments for and against each language, like in 2001 & 2002 when Microsoft modified Java, breaking portability, and ended up sued by Sun twice.
Every language has its strengths and weaknesses, and updates sometimes break backwards compatibility. It happens. It doesn’t mean everyone is crazy for wanting (or resisting) some new functionality.
The rant isn’t specific to smoosh, but rather to TC39 standard allowing altering prototypes. Language updates that alter this can effectively break anything. It’s not a good way to evolve Js, it basically ensures that it won’t ever be stable.
JS standard lets developers put stuff on the global window object. So does that mean no new globals can be added to the language ever?
I wish the discussion here wasn’t about what to do in this case or that case but how to change the language in a fundamental way such that this entire class of issues cannot happen in the future.
I have many, many issues with both the JS language and the JS ecosystem (and community!), but this is not the hill this author should be dying on.
JS gave people the power to modify the base prototypes of the standard library. Anybody with any experience should feel gross when they monkeypatch core bits of their language. The cost for doing this is “hey, if the language changes, your monkeypatches might behave incorrectly or get invoked unexpectedly”.
We don’t get to have a competent standard library if we have to unconditionally respect the favelas of devs who decided to add things in places that were obviously not theirs.
(Also, the amount that this author argues through other examples, like doctors or website layout or whatever, instead of sticking to the core domain is really tiresome to me.)
As mentioned by friendlysock, every description of monkey patching I’ve ever seen warns that it may cause problems with updates. Any time somebody modifies an object they don’t own, they’re taking a risk.
The author here is talked about the latest
smooshdebate without naming directly, but this isn’t the first time JS has added functionality, or broken backwards compatibility, Here’s an example from 2008. Developers survived this upheaval then, and they will survive it now.The author also mentions the long-standing Java/Javascript flame wars, but anybody can find arguments for and against each language, like in 2001 & 2002 when Microsoft modified Java, breaking portability, and ended up sued by Sun twice.
Every language has its strengths and weaknesses, and updates sometimes break backwards compatibility. It happens. It doesn’t mean everyone is crazy for wanting (or resisting) some new functionality.
The rant isn’t specific to smoosh, but rather to TC39 standard allowing altering prototypes. Language updates that alter this can effectively break anything. It’s not a good way to evolve Js, it basically ensures that it won’t ever be stable.
Altering chunks of the core isn’t unique to Javascript though, in C you can define
TRUEto beFALSE, and naturally havok will ensue.