DEV Community


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

Saurabh Sharma
Web development React.js GraphQL Typescript JavaScript Design SEO
ใƒป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?

Discussion (4)

mvsde profile image
Fynn Becker

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.

itsjzt profile image
Saurabh Sharma Author • Edited

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

guitarino profile image
Kirill Shestakov

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

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

itsjzt profile image
Saurabh Sharma Author

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