Hacker News new | ask | show | jobs
by reissbaker 4117 days ago
So, you're right that nothing can be removed. But you can add new things, and via mode switches (e.g. "use strict", which enables strict mode currently, or "use strong", which is planned to enable strong mode) essentially remove old ones by disallowing them in the latest "mode." Old code will continue to run, but as long as you opt-in to the new way of doing things for your new code you can enforce not using the legacy constructs in the new code.

It's important to note that the modes are on a per-function basis, so opting into the new mode doesn't break existing libraries, etc even if you call those libraries from a newer mode.

It's also worth mentioning that strong mode doesn't introduce anything new. All that strong mode does is remove features. `let` and `var` both already exist; in strong mode, only `let` does.