Remix.run Logo
wiseowise 8 hours ago

1) Put JS in maintenance mode, don’t add any language features, only runtime

2) TS becomes the official mainline, whoever doesn’t like types can just keep writing as they did before, because valid JS is valid TS

Problem solved, it’s not that difficult.

cardanome 7 hours ago | parent | next [-]

TS trademark is owned by Microsoft.

That would be a case of out of the frying pan into the fire. Not really better.

lcnPylGDnU4H9OF 7 hours ago | parent | next [-]

Call it ES2026 officially and let other people devalue MS' trademark as they refer to that (and later versions) as TS.

bayindirh 7 hours ago | parent [-]

...and we'll have another API warfa^H^H^H^H lawsuit that we had for Java.

lcnPylGDnU4H9OF 7 hours ago | parent [-]

Wasn't that a copyright issue? I thought the point of contention is that Google allegedly copied Oracle's API design when they re-wrote Java for Android.

bayindirh 7 hours ago | parent [-]

Wouldn't Microsoft do the same thing when somebody copies the language and names it "TypedWebBrowserScriptbutFree"?

lcnPylGDnU4H9OF 6 hours ago | parent [-]

https://github.com/microsoft/TypeScript/blob/main/LICENSE.tx...

The license is Apache 2.0. With the trademark, they can tell everyone not to call their thing TypeScript but at this point, given the license, they can't tell them not to copy it and change it and distribute that new thing (assuming the new distributors do so under the correct conditions).

walthamstow 7 hours ago | parent | prev [-]

Same as Go and Google then. Is the ownership of the trademark of the name/logo of a FOSS language really that big a deal?

mdasen 7 hours ago | parent [-]

That's the entire issue here: JS is a FOSS language and they don't like that Oracle owns the trademark.

walthamstow 7 hours ago | parent [-]

Oops. Outing myself as someone who didn't read TFA.

morshu9001 3 hours ago | parent | prev | next [-]

Valid JS is often not valid TS. Any nontrivial amount of JS copied into TS will generally not work without tweaks. When people say TS is a superset of JS, it's just some academic definition of syntax supersets that isn't practically true.

Non-exhaustive examples:

    let foo = 2
    foo = "foo"  // TS disallows type change
    let bar = {}
    bar.baz = 2  // TS disallows adding property
ddtaylor an hour ago | parent | next [-]

The amount of weird TS I see that attempts to keep the JS style of code while getting the compiler to stop being mad is strange. I will see hundreds of line of type inference work, when they could have just made an actual type.

morshu9001 an hour ago | parent [-]

I feel like most people using TS are not doing it by personal choice but because someone else decided it

anematode 2 hours ago | parent | prev [-]

Even syntactically, TS is not a superset of JS: https://anemato.de/blog/js-to-ts

morshu9001 an hour ago | parent [-]

Oh I hit this case too. Yeah it's not a superset in any sense of the word.

criticalfault 38 minutes ago | parent | prev | next [-]

Or, just delete both and use dart.

marcelr 7 hours ago | parent | prev | next [-]

ah yes, the regressive approach

NooneAtAll3 5 hours ago | parent | prev [-]

3) remove js and its derivatives from the internet, switch to lua or smth

saghm 5 hours ago | parent | next [-]

OT, but I learned Lua this year in order to be able to write a mod for a game, and maybe this is due to it being a while since I last used a dynamic language regularly, but Lua really feels like it's basically what JavaScript was intended to be. Both use a map-like data structure for basically everything, with integer keys to make them act like arrays, function values to make them act as objects, but Lua using an explicit function call in `for ... in` loops avoided needing a separate construct to be added later on for iterating over arrays in order (or having to resort to manually iterating over the numbers rather than the array itself). Lua's module system reminds me a lot of how Node's `exports` works (although nowadays I understand there are other ways of importing/exporting stuff in JavaScript), and it's not obvious to me that the power of prototypes in JavaScript are worth the extra complexity over using the module system for the pre-ES6 model of OO that JavaScript used. I feel like Lua basically already has solved most of the stuff that JS has needed to add a lot of new features for in recent years. I imagine this is something that a lot of people were already aware of, but at least personally, even being cognizant of the flaws that JS had been trying to fix, I hadn't realized an already well-established language had a design that solved most of them without also having a lot of additional scope beyond what JS was trying to do (e.g. Python having full-fledged class-based OO) or at least superficially looking a lot different (e.g. some form of lisp, which I know had been at least talked about in the early web days as a potential option but might have faced more of an uphill battle for adoption).

pennomi 4 hours ago | parent | prev | next [-]

Should be easy, it’s not like there’s any legacy code out there written in JS.

jm4 5 hours ago | parent | prev [-]

Yes, because that's a pragmatic and realistic solution.