What javascript would look like if they could make breaking changes in it.

itsjzt profile image Saurabh Sharma ・1 min read

We all know most of the problems in javascript is because of the fact that it was designed in very short period of time. Result of that we have lot of bad parts and w3c dont want to break backwards compatiblity of web so they don't fix it.

But just for this post imagine if we could make breaking changes in javascript.

What it would look like then?


markdown guide

The whole Date situation would probably be thrown away and build from scratch with a lot more convenience stuff. Maybe the best parts of moment.js and date-fns as part of the core language.

And switch would become a bit more JavaScript-y, so devs won't be afraid to use it more 😁 The colons really look out of place in regard to the rest of the language.


Yeah switch is like the unused part of language, along with with


I think "===" would become "=="

We'd have "box-sizing: border-box" by default


To me I think

  • it will get more parts from scheme
  • fix type null == "object"
  • breaking changes in var
  • strict types i.e. less type coercion
  • maybe pattern matching and stuff