3 ms·
You can't generally inline unsafe C++ into other languages (like, literally in the same file, or method) the way you can inline unsafe blocks into Rust. This i
by pcwalton 9y ago
You can't generally inline unsafe C++ into other languages (like, literally in the same file, or method) the way you can inline unsafe blocks into Rust.
This increased friction invariably leads to C++ folks making a lot more code unsafe than needs to be.
- pjmlp 9y agoTrue, but tooling is much more relevant than the ability of inlining code. It took me more time to make something usable with Gtk-rs, than it usually takes me to write JNI bindings on Android. I used to complain about the way Google manages the NDK, quite easy to find if you search for them. However, in the last couple of months I came to realize that it actually makes sense, it is their way to keep Android safe while keeping the door open to write some performance critical sections of code.
- pcwalton 9y agoNot if your goal is security. Android is not a particularly secure operating system. The JVM is not treated as a security boundary.
- pjmlp 9y agoWhich is exactly how we got here. If perfect security implies less productivity, security conscious people abide by "good enough" to appeal to the masses.
- pcwalton 9y agoWe were talking about the kernel. The internals of the kernel don't need to "appeal to the masses". Nor do the low-level system libraries. You are trying to argue that C++ for system libraries plus a high-level language for apps is as secure as an all Rust app. This is empirically not true. Virtually the entire security community disagrees with you.