2 ms·
C# stands out a bit as it provides first-class manual memory management APIs, zero-cost abstractions and tools to do RAII like many other systems programming la
by neonsunset 2y ago
C# stands out a bit as it provides first-class manual memory management APIs, zero-cost abstractions and tools to do RAII like many other systems programming languages do. It's quite unlike most other GC-based languages once you look at it closely.
If anything, it allows you to go way more low-level than Go.
- consteval 2y agoWhile true, I'd argue the way C# is used is closer to Java than C++, despite the tools it provides. Also I think Go allows manual memory management as well, although close to nobody uses it. In my head, there's a "sharp" divide between GC langs and non-GC langs. While the GC langs may provide some shallow hacks to get close to what lower-level langs can do, for those lower level langs that's all they can do. And typically it's not a 1-1.
- neonsunset 2y agoThe tools C# provides are far from "shallow hacks". Go does not provide "equivalent" ability to malloc and free, or write C structs with explicit layout. Does not have the same type of struct generics C# has ala Rust or C++ templates, it's not even close. Perception problems do not affect technical capability, and there exists a world of gamedev beyond enterprise engineering that treats C# appropriately.