3 ms·
Interesting. C++ sort of has parts of this concept with const and std::move operators. From your code example, I feel like one problem is that arguments are pa
by mmmmmbop 3y ago
Interesting. C++ sort of has parts of this concept with const and std::move operators.
From your code example, I feel like one problem is that arguments are passed the same way wether it's r, w, or o. Meaning that if e.g. the foo(x: r i32) API changes to foo(x: o i32), your code that was previously modifying x afterwards would now break.
- zademn 3y agoI didn't dive deep into C++, the main idea is to let users "compose" different permissions instead of the language composing them for us by giving some keywords. You are correct, the code example is minimal, we can introduce some semantics to how we pass arguments too. I wanted to focus on the idea of composing permissions.