3 ms·
Wow, what a shitty language. Lets code dynamically change things that other code depends on. Including behavior in built-in object prototypes. Has weird prope
by Hizonner 4y ago
Wow, what a shitty language.
Lets code dynamically change things that other code depends on. Including behavior in built-in object prototypes.
Has weird properties like "enumerable" on members of those prototypes, so that changing a property doesn't do the same thing as adding one... but the API for both is the same.
It's like the language is built to cause breaking changes. "Don't break the Web" indeed.
The root cause here is writing millions of lines of code in something that was originally just supposed to validate forms.
- c3534l 4y agoThe internet is a series of bad decisions its too late to undo.
- dwaite 4y agoAlso, undoing those decisions would likely just be replacing them with new and different bad decisions.
- yencabulator 4y agoI for one am quite ready to replace the bad decision of Javascript with the differently-bad decision of WASM. I would cherish never having to touch Javascript Object oddities again. Can we have WASI DOM access etc soon please?
- Smoosh 4y agoProbably true of most large codebases.
- trinovantes 4y agoHow is that any different than any language introducing a new keyword that existing code previously used as variable names? Normally this wouldn't break anything since the developer has to opt in to update the compiler/runtime. The problem is the runtime (browser) autoupdates and the developer has no way to opt out of their code running on the new runtime.
- uup 4y agoAPI changes are way more common than adding keywords. That’s one difference.
- trinovantes 4y agoDoesn't matter which is more common. All actively developed languages eventually get new keywords and breaking changes. However, most of them will not interfere with existing code running under previously defined behaviors. Even node 10 applications that use MooTools (i.e. JavaScript executing in a different runtime) will continue to work just fine if `flatten` is added as proposed in node 11+. The developers will eventually need to patch it but it's not like this bug where one day users autoupdate their browser and half the websites they visit are broken.
- com2kid 4y ago> Lets code dynamically change things that other code depends on. Including behavior in built-in object prototypes. Not exactly uncommon for languages that feature reflection. Heck the win32 api allows you to hook and intercept function calls. So do plenty of other native C and C++ APIs. It is a powerful feature that allows for a lot of functionality, including extending out libraries and fixing bugs in SDKs that you'd otherwise have to wait an entire release cycle for, or that may never get fixed. (And release cycles used to be years long!)