News for hackers. Stuff that matters.
Re:SmooshGate by Hizonner on Monday October 10, 2022 @07:56PM (#33157809)
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.

Re:SmooshGate by c3534l on Monday October 10, 2022 @09:24PM (#33158382)
The internet is a series of bad decisions its too late to undo.
Re:SmooshGate by dwaite on Monday October 10, 2022 @09:42PM (#33158501)
Also, undoing those decisions would likely just be replacing them with new and different bad decisions.
Re:SmooshGate by yencabulator on Tuesday October 11, 2022 @12:17PM (#33165244)
I 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?

Re:SmooshGate by Smoosh on Tuesday October 11, 2022 @01:50AM (#33159915)
Probably true of most large codebases.
Re:SmooshGate by trinovantes on Monday October 10, 2022 @09:45PM (#33158528)
How 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.
Re:SmooshGate by uup on Monday October 10, 2022 @11:52PM (#33159335)
API changes are way more common than adding keywords. That’s one difference.
Re:SmooshGate by trinovantes on Tuesday October 11, 2022 @05:49AM (#33161309)
Doesn'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.

Re:SmooshGate by com2kid on Tuesday October 11, 2022 @12:04AM (#33159399)
> 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!)