All languages in mainstream use are imperative and at least somewhat object oriented, other than SQL. But many of those don't have what it takes to implement capabilities (too flexible/dynamic).
First we need capability-based OSes, like we should have had decades ago if worse-is-better hadn't stuck us with Unix. I don't need to care whether or not a program was written in a capability-aware language if the OS fundamentally takes care of that for me.
HarmonyOS is a capability based OS. I don't know why anyone in China is still using Rust. The biggest social engineering hack was for the Rust team to convince developers that it is a safe language.
1. seL4 exists. I haven't seen much more formal and rigorous than it. Efforts have ported the Linux kernel and RTOS-things to it.
2. Add syscall(s) to POSIX, which encourages *nix adoption, with an API like the following:
- Drop capabilities for thread/process except allow list.
- Test if current thread/process has all listed capabilities.
- List should be able to represent capabilities and their attributes, much like a single unveil() OpenBSD call, maybe as an array of/pointer to struct.
- (Program crashes if syscall capability is missing.)
Why not object capability languages: https://blog.plan99.net/why-not-capability-languages-a8e6cbd...
No. Object-oriented brings things many languages cannot use. Also, that was a tl;dr fluff blog with barely any examples.
All languages in mainstream use are imperative and at least somewhat object oriented, other than SQL. But many of those don't have what it takes to implement capabilities (too flexible/dynamic).
First we need capability-based OSes, like we should have had decades ago if worse-is-better hadn't stuck us with Unix. I don't need to care whether or not a program was written in a capability-aware language if the OS fundamentally takes care of that for me.
HarmonyOS is a capability based OS. I don't know why anyone in China is still using Rust. The biggest social engineering hack was for the Rust team to convince developers that it is a safe language.
Actually HarmonyOS NEXT is getting its language as well, Cangjie.
https://cangjie-lang.cn/en
https://cangjie-lang.cn/en/docs?url=%2F1.0.0%2Fuser_manual%2...
FreeBSD does this with Capsicum: https://wiki.freebsd.org/Capsicum
1. seL4 exists. I haven't seen much more formal and rigorous than it. Efforts have ported the Linux kernel and RTOS-things to it.
2. Add syscall(s) to POSIX, which encourages *nix adoption, with an API like the following:
- Drop capabilities for thread/process except allow list.
- Test if current thread/process has all listed capabilities.
- List should be able to represent capabilities and their attributes, much like a single unveil() OpenBSD call, maybe as an array of/pointer to struct.
- (Program crashes if syscall capability is missing.)