I was recently talking to a couple of programmers at a dive bar, and naturally, we converged on the tech we used. We all programmed in some flavor of modern interpreted language: Javascript, PHP, and Ruby. Naturally, we started shitting on these languages immediately. Ignoring the fact that these languages power most modern internet companies.
It's cathartic to bitch, and jumping onto the hate train easy and in vogue. But, I mostly appreciate modern Javascript, but there's not a lot I'd radically change. But, all my desired improvements aren't additions, they're mostly deletions.
This isn't meant to be realistic or something I'm going to build, but the exercise gave me a clear idea of what I value versus what I consider needless overhead.
Today, I imagine a future Javascript shaped by my ideal design philosophies without constraints. For the most part, this was an exercise in deleting bloat instead of adding features.
Philosophy
Minimalism: Keep the core small. Limit the number of keywords and constructs to make the language easier to learn and use. Remove features that add complexity or have redundant alternatives (e.g.,
switch
,var
,default
exports). If a keyword is redundant delete it.Familiarity and Predictability: Nothing should drastically change that anyone else using it would be able to get up and running fast. There shouldn't be overhead on the language surprising you by some quirk.
General Purpose: This isn't a system's language, memory management isn't required. This is for scripting, APIs, and web apps.
Modern Practices: Strict types,
async/await
, and immutability are good things.
🌶️ snake_case vs. camelCase
This is my spiciest take: Snake case is clearly a better writing pattern. It gives words more room to breathe and create a more natural reading flow than camel case does. Bunching letters together is tougher to look at. Now, its technically possible to do this now, but because the standard is to write in camelCase it would be incredibly awkward to do this in your JS codebase.
Start “imports”
with “from
”
Javascript’s current module system syntax feels cumbersome. Instead of 
import { something } from 'module'
I prefer the ordering:
from 'module' import { something }
This makes the source of the import explicit before specifying what is being imported, which can enhance readability—particularly for developers coming from other languages where this order is more natural. It also improves tooling and makes autocomplete more intuitive by identifying the source before specifying the imported value.
Remove switch
and while
statements
Control flow in Javascript is overly cumbersome with to multiple options like switch
, while
, and for
. Get rid of switch
and while
, opt to rely solely on if/else
and for loops. The switch statement can be replaced by if/else
blocks, while while loops can be effectively represented by `for
` loops. This is inspiration from Go lang. Removing control flow keywords also makes the language easier to learn and use. Redundancies aren't needed.
🌶️ Only Newlines as Terminators; No Semicolons
Semicolons are practically worthless and should be removed. Newlines would serve as statement terminators. This would make Javascript easier on the eyes and similar to languages like Python that benefit from whitespace-driven syntax.
async/await
The async/await
syntax is great. Lets keep doing this.
No yield
, rely on async/await
Yield is pure overhead. Remove it and default to async/await
No var
, Only let
and const
The var
keyword is one of the most problematic parts of older Javascript. It's only still there because of legacy compatability. I'm beating a dead horse with this one, but it feel be weird if I didn't add this in.
Remove `default` exports
Names exports are enough and keeping things named consistently is clearer.
No Implicit Type Coercion
Enforce strict typing, and avoid the pitfalls of Javascript's implicit type conversions.
No Hoisting
Hoisting can cause confusing behavior. Variables and functions must be declared before use.
🌶️ No parentheses on if/else
or for
statements
Currently, Javascript requires parentheses around conditions in if/else
statements. Removing the need for parentheses would make the syntax more concise and reduce visual clutter. This would simplify code, making it look cleaner and more streamlined, similar to Python’s if
statements. Similar to camelCase words, adding parens can make the code feel tight and giving the code more breathing room can be more improve reading flow.
Built-In Code Formatter
Another nod to Go. The built in formatter is amazing. Relying on prettier is fine, but having this as a core part of the language would remove any room for errors here.
Typescript
Types are amazing. They help with tooling, safety, confidence, and development speed. Adding base Typescript types into the language would be incredible.
Testing
Author received signal SIGSEGV, Segmentation fault.