3 ms·
>C#, Java? Managed code with JITs, not supported on a kernel level no-way no-how. Ditto for Python, PHP, JavaScript, and other high-level languages without poin
by kgeist 5y ago
>C#, Java? Managed code with JITs, not supported on a kernel level no-way no-how. Ditto for Python, PHP, JavaScript, and other high-level languages without pointers and all that jazz.
C# has pointers and can be compiled to native code. I think the main problem is GC which is required for most of the standard library (you can avoid heap allocations but that would be unidiomatic)
- HideousKojima 5y ago>you can avoid heap allocations but that would be unidiomatic AFAIK until recently (with the introduction of the Span<T> types), the only way to avoid heap allocations for arrays or any other kind of collections in C# was with stackalloc, which is unsafe.
- notanaverageman 5y agoYou still have to use stackalloc to allocate on stack. With Span<T> you don’t have to use the unsafe keyword and you can pass the allocated array to other functions easily.
- kaba0 5y agoI don’t think GC would be a problem in a general case (there are OSs written in Java, so there is that), but yeah, it probably wouldn’t be a great fit for the already existing linux code base. Especially that one kinda important function of the kernel is to GC other resources either way :D