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
TOC
ONE:
Stakeholders
Tools
Devs
Users
et al.
Implementers
Engines
JS is special: outsized everything
2:
We evolve the language to help developers
We want to help developers to be more productive, by…
…better matching their mental models (e.g., FP, OOP, type systems)
…enabling them to more simply express new domains (e.g., ML, finance, scientific computing, i18n)
…enabling them to build new class of apps with new capabilities (e.g., weak refs, shared memory)
…letting them use new interfaces (e.g., Wasm)
…reifying common programming patterns they use
…simplifying their lives by removing dependencies and build tools
Specifically, how do we help developers?
Abstracting away complexity moves it, not removes it
three:
three:
What do users want?
Remember, end users are the implementations' primary customer!
What user impact do new language features have?
Security
Complexity = Security bugs
Sample of recent engine (V8, SM) CVEs (i.e. filed externally):
(To show you that I am a serious man, the vulnerabilities above are in set in Arial.)
Browser vendors aren't yahoo outfits. This is despite state-of-the-art security engineering with fuzzing, bounty programs, security reviews, etc.
Security / General Complexity
Performance
Stability
New app features
Aren't these negatives to the user offset by the benefit to developers?
No.*
* I mean clearly it's a polarity. This is saying not all wins for devs are necessarily wins for users.
Cost to users is in aggregate
Goals in tension
Helping developers to be more productive
Doing right by users
Goals in tension
Helping developers to be more productive
Doing right by users
Where I think we are today
Where I think we should go
How do we get there?
We need to talk about how we introduce new features
What engines want
Engines want to ensure security, performance, and stability for users
Takeaway
Engines are going to be more conservative with new language features
Not proposing new process or demotions!
This is about steering for the future
Taxonomy of new language features
Syntax
Decomposability
Language distance
Decomposable
Functionally intrinsic
Requires static compilation
dynamic
APIs
Builtin methods
New Builtins
New Capabilities
Exposing the host system (Machine, OS, Compiler, etc)
Exposing the host platform (Web, Node, Embedded, etc)
New Capabilities
Opportunity cost of not adding new capabilities is large because the alternative is "you can't do it"
These are where most of the risk appetite is for implementers
Rough guidance for where the bar is
What engines want
Engines want to ensure security, performance, and stability for users
Takeaway
Engines are going to be more conservative with new language features
Engines being conservative
⇏
Stop evolving the language
So here's a possible solution for Syntax features
Disclaimer: this possible solution is Google's preferred solution, not necessarily other implementers'
Developers have embraced tooling
Authoring JS is now primarily intermediated by tools
Tools exist and are widely adopted.
Let's use that fact for a win/win.
Let's standardize JS as the ecosystem uses it
(Yes, the names could be better. Indulge them for now, happy to bikeshed later.)
Tools
Devs
Users
JS0
JS0
JSSugar
JS0
JSSugar
et al.
Engines
Implementers
Proposal
This is not a proposal for tools to do non-standard extensions!!
This is a proposal calling for more tooling participation in TC39 and more standards compliance among tools.
Proposal
Win/win?
Win/win?
Win/win?
FAQ: What about "1 JS"?
FAQ: Why require build tooling?
FAQ: Won't DevTools will be worse?
FAQ: What about proposal XYZ?
Next steps and challenges
I'm sure many of you have many thoughts