2 ms·
Sure, but languages aren't designed to provide secure isolation on a module-by-module level. The encapsulation that exists (e.g. private fields) isn't for secur
by klabb3 5y ago
Sure, but languages aren't designed to provide secure isolation on a module-by-module level. The encapsulation that exists (e.g. private fields) isn't for security.
Or is there some security feature of node or JS that I'm missing?
- ryukafalz 5y agoYou’re right that in most languages, encapsulation isn’t strong enough to be used for security in this way. However, there are languages in which it is; scheme I believe has strict enough lexical scope and encapsulation to be used like this. (And of course there are languages designed specifically for this purpose, though they’re not often used: E and Monte come to mind.) Of the popular languages, though, JavaScript is the closest to being strict enough for this style of programming, and there’s been active work for a while towards that goal: https://agoric.com/blog/technology/ses-securing-javascript/ https://agoric.com/blog/technology/ses-securing-javascript/