4 ms·
C# is GC'd so massive memory hit, and also not a language you can have in a kernel. Go: GC again, so no go. Rust: most sane of the examples you've given. App
by olliej 6y ago
C# is GC'd so massive memory hit, and also not a language you can have in a kernel.
Go: GC again, so no go.
Rust: most sane of the examples you've given.
Apple has already started migrating to Swift which is a memory safe language.
However the real reasons Rust and Go aren't feasible is that they're both essentially all-or-nothing, and neither offers even the most basic semblance of ABI compatibility. Their only nod to ABI stability is "use FFI to C" which means your APIs remain unsafe, and doesn't work for non-C languages without all your system APIs having other languages layered on top.
Swift at least lets you replace individual objc classes one at a time, and is ABI stable, but has no C++ interaction.
- gfxgirl 6y agoSwift is far more like C# than Rust in terms of memory management. Sure it uses ARC but arguably that makes it not suitable for kernel level stuff.
- olliej 6y agoxnu is refcounted, its also c++ which isn't swift friendly. XNU also has ABI stability requirements which rules out rust.
- deleted 6y ago[deleted]