|
|
|
|
|
by conaclos
1228 days ago
|
|
I could like to have a kind of rust edition for JavaScript. You could opt in to an edition by adding a JavaScript directive at the start of the file — like the "use strict" directive. e.g. ```js
"use edition2023"
```
This could enable to remove obsolete features and improve strictness.EDIT: I forgot the "use" before "strict". |
|
You write Typescript or CoffeeScript or Clojurescript or ES6 or in this case "JS edition2023". You have a preprocessing step that compiles this into code that works on everyone's browser. Your new language has the features and quirks you want, without having to solve the problem of deploying a new runtime to a billion older machines.