Hacker News new | ask | show | jobs
by tomatsu 3139 days ago
> why nobody has created a version of JavaScript that just throws exceptions for all the WTF cases?

Google experimented with something they called "strong mode". Classes were read-only, accessing nonexistent properties was an error, and things like that.

I liked it. Unfortunately, the experiment didn't go anywhere and strong mode was removed from Chrome.

Dart is somewhat similar, though. It got more straightforward semantics than JS and most of those WTF things are an error.

1 comments

Dart has strong mode.
Dart's strong mode is different (it's about using a sound type system) and with 2.0 (or if you're using Flutter), it's mandatory.

https://www.dartlang.org/guides/language/sound-dart