4 ms·
Does C# not have a GC? I thought that would immediately disqualify it for kernel work.
by mejutoco 4y ago
Does C# not have a GC? I thought that would immediately disqualify it for kernel work.
- theta_d 4y agoIt does have GC but that is not the point being made. I believe the point the author is making is that other languages provide better safety than C and have faster compile times than Rust, therefore Rust should be able to improve its compile times.
- rbanffy 4y agoGC is not a roadblock for OS kernel work. Smalltalk is itself an OS and had GC from the start. IBM's i (the descendant of OS/400) most likely has GC as part of its kernel. Lisp machines had hardware-assisted GC. What you may want to try to avoid is complex and non-deterministic GC, which makes it harder to reason about.
- pedrocr 4y agoIf those languages achieve their memory safety at runtime, like C# does with GC, then that becomes relevant to the point of the compile time performance. The C# compiler has to do less as that complexity has been pushed elsewhere with different tradeoffs.
- pjmlp 4y agoRust safety with runtime dependencies, Vec bounds checking, Arc and Rc datatypes. Ada with SPARK 2014 formal proofs, for your other part of the remark.
- 5e92cb50239222b 4y agoFor Linux kernel work. https://www.microsoft.com/en-us/research/project/singularity https://www.microsoft.com/en-us/research/project/singularity https://en.wikipedia.org/wiki/SharpOS https://en.wikipedia.org/wiki/SharpOS
- pjmlp 4y agoFor Linux yes, for those that aren't blinded by anti-GC religion, no. https://www.wildernesslabs.co/ https://www.wildernesslabs.co/
- Ygg2 4y agoAnti GC isn't a religion. GC is a performance cliff in some cases.
- pjmlp 4y agoIt is certainly a religion, as most people that advocate against it hardly ever learned to use a profiler, or bothered to learn that not all GC languages are alike, and many of them offer the same capabilities like C and C++ for low level coding.
- Ygg2 4y agoIt's not, collaborating on a C# game engine and what I've seen is basically a lot of skirting around GC, because it's impact shows up in profiler. It has gotten to a point arrays and stack alloc are prefered over List and HashSet were basically forbidden in the hottest path. Except most of C# ecosystem relies on classes and GC. A lot of these problems are caused by overuse of GC-ed classes, and their ease of use.
- pjmlp 4y agoDon't confuse Unity runtime with C#, specially since it lacks all the nice features post C# 7. C and C++ aren't immune to heap abuse as well. You do on C# just like on them, think about data structures, and avoid heap during render loop
- Ygg2 4y agoDid I mention Unity? It was a independently developed engine. The engine is in C# 10. They still ran into limitations where basically "This would be a lot easier if we didn't have GC".