Trying to read up on the JSSugar/JS0 thing.

Am I supposed to take these slides seriously? 😐
https://docs.google.com/presentation/d/1ylROTu3N6MyHzNzWJXQAc7Bo1O0FHO3lNKfQMfPOA4o

Language Evolution

Language Evolution Problems, and What Can We Do About It? Shu-yu Guo, Google Matthew Gaudet, Yulia Startsev, Mozilla Keith Miller, Michael Saboff, Apple Peter Hoddie, Moddable Ross Kirsling, Sony Oct 2024 TC39

Google Docs

@kolombiken Deleted my previous reply, now actually read the slides, and I like the proposal in some ways, at its core it feels like https://extensiblewebmanifesto.org/ being pitched to the TC39 and I think the extensible web manifesto at large is a good approach for the web

What I don’t like about it:

- The focus on transpiling. High level ā€œJSSugarā€ features should as far as possible be polyfillable and not require a transpilation step

1/x

The Extensible Web Manifesto

- The naming was poorly suggested. JS0 will not be something new, it’s JS as it is today, and JSSugar would essentially just be the TC39 opening the door to TS-level standardization, and it shouldn’t really just be syntax sugar so the JSSugar isn’t a good name either
- I’m unsure whether the ā€œJSSugarā€ is best handled through TC39, through a single spec or if it’s something that should be standardized separately by TypeScript, Babel etc.

2/x

I still think back to when jQuery informed the creation of querySelectorAll() within the DOM specification as one of the best examples of the extensible web idea in practice.

In the context of this proposal I’m unsure if a similar approach for a JS extension would have been expected to be speced in ā€œJSSugarā€ first and only then have parts of it ā€œgraduateā€ to ā€œJS0ā€? If so, then I think that would make it harder to iterate on by tools makers

3/x

Maybe ā€œJSSugarā€ is imagined as only for syntax sugar like type annotations and decorators (https://github.com/tc39/proposal-type-annotations and https://github.com/tc39/proposal-decorators) and if so then I think that is very fine

A feature like ā€œArray.fromAsyncā€ (https://github.com/tc39/proposal-array-from-async) is something that either would need to go into JS itself or else be better of as an npm module. If it’s anyhow going to be bundled into the transpiled code then the reason to standardize it is slim and it wouldnt make much sense to add it to JSSugar

4/x

GitHub - tc39/proposal-type-annotations: ECMAScript proposal for type syntax that is erased - Stage 1

ECMAScript proposal for type syntax that is erased - Stage 1 - tc39/proposal-type-annotations

GitHub

All in all: Cautiously optimistic about #JS0 / #JSSugar but feeling that:

1. This is nothing new, it’s just a call/reminder to the TC39 to embrace the #extensibleWeb approach to new additions
2. Calling it JS0 rather than JS was really bad and made eg me defensive about it all
3. The focus on transpilation is bad if JSSugar is meant to embrace more than syntax only features

#extensibleWebManifesto

5/5

@voxpelli I might have gotten certain things wrong. But there are a couple of things that I don’t like.

I agree about the focus on transpilation. It’s bad. It’s like they think almost all js on the web already goes through a transpiler. Not true!

Another thing is that I don’t think it’s healthy to trust transpilers with getting the implementation right.

Also is this how they want the whole web to work? Or just some part of it?
I’m confused!

@kolombiken Someone had a good point over here: https://mastodon.social/@voxpelli/113339279662731155

That if all this gets standardized, then why would I need to run the tooling before I publish to the web? Why can’t the browser do like eg Deno does and ship with the pre-processor built in?

If there’s a standard way of doing it, why not ship it in the browsers?

@voxpelli I’m guessing same reason as to why you have to compile any language? They can’t imagine doing it directly in the browser will ever be performant enough?

And I really hope none of this is standardized. It has a very much ā€breaking the webā€-vibe to it. It’s a strength that you can just write something in a document, upload it and it will run. No extra tooling is a good thing!