Comment

Comment by MH15

In a similar vein to "use strict" we could create a new directive that disallows JS features like var, prototype, == (in favor of ===). Modules with this new directive at the top of the file would be executed under these new rules. You'd be able to create new (maybe lighter weight) JS interpreters that only target this subset.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

parent MH15 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton