Hacker News new | ask | show | jobs
by conaclos 1223 days ago
What I propose is introducing breaking changes via editions.

For instance, we could freeze class prototypes making impossible to dynamically replace a method or adding a method to it.

This what "use strict" did by forbidding `with` statements for example.

2 comments

Browsers still have to support the older editions for backwards compatibility, so each new edition increase complexity.
You never break user space.
Only a Sith deals in absolutes. Presumably that is why proposed mechanism requires the user to explicitly opt-in, just like with `"use strict";`.