3 ms·
Indeed, being able to apply capabilities on a package level would be great, but I don't know many languages/environments that implement this as a first-class fe
by detaro 6y ago
Indeed, being able to apply capabilities on a package level would be great, but I don't know many languages/environments that implement this as a first-class feature.
- ryukafalz 6y agoYeah. JavaScript is probably the closest to being there (with things like SES[0], LavaMoat[1], etc.) but we're not quite there yet. It's just shocking that this sort of thing is as seemingly obscure as it is; it's like the whole industry has collectively thrown up their hands and said code execution is unavoidably radioactively dangerous. (While simultaneously using package managers that... well.) But it doesn't have to be! [0] https://github.com/Agoric/ses-shim https://github.com/Agoric/ses-shim [1] https://github.com/LavaMoat/LavaMoat https://github.com/LavaMoat/LavaMoat
- eecc 6y agoJava does. Of course it’s never been used systematically and it has received precious little attention to DevOps ergonomics, but the infrastructure is there
- detaro 6y agoI didn't know that. Do you happen to have a link with more details at hand?
- sid- 6y agohttps://docs.oracle.com/en/java/javase/15/security/permissions-jdk1.html#GUID-8D0E8306-0DD8-4802-A71E-CFEE9BF8A287 https://docs.oracle.com/en/java/javase/15/security/permissio...
- bluetech 6y agoJava actually doesn't need to add any features for it to support this, it needs to remove them. I recommend reading this excellect article: http://habitatchronicles.com/2017/05/what-are-capabilities/ http://habitatchronicles.com/2017/05/what-are-capabilities/ The gist is: Rule #1: All instance variables must be private Rule #2: No mutable static state or statically accessible authority Rule #3: No mutable state accessible across thread boundaries
- dwohnitmok 6y agoSafe Haskell is one in this vein (it's lower level and you would apply a capability layer on top), although like other past efforts on this front it's mostly languished in obscurity even among the Haskell community and is used by very few people. The main hope at the moment seems to be JS.
- newhouseb 6y agoThe WASM ecosystem is exploring this through the use of what they call "nanoprocesses" wherein libraries are wrapped into modules and provided access to nothing by default [1]. This seems to be more of a pattern and consequence of how WASM works than a specific feature. 1. https://hacks.mozilla.org/2019/11/announcing-the-bytecode-alliance/ https://hacks.mozilla.org/2019/11/announcing-the-bytecode-al... (ignore the title, it's irrelevant to the excellent explanation that constitutes 70% of the post)