2 ms·
I would think C# is meant to be a general purpose language based on that. Python too is a general purpose language but community libraries (which I think the su
by subtra3t 3y ago
I would think C# is meant to be a general purpose language based on that. Python too is a general purpose language but community libraries (which I think the support for C extensions helped with) enabled amazing things like scipy.
Similarly I think C# excels at game development because of the many engines it is used. Maybe it began because of XNA but then got popularised because of Unity but I do not think it is due to any special features in C# itself that are not found in other languages. I am not sure about this so please correct me if I am wrong.
- neonsunset 3y agoHmm, out of all languages with GC, C# offers lowest level constructs (pointers, tracked references (refs), pure C structs and low/zero-overhead interop)*, which something all other options either don't offer at all, or offer partially or with higher overhead and worse UX. All of these are very useful for interoperating with graphics APIs directly and managing memory manually for performance sensitive code paths. I don't think these were the reason behind C#'s rise in gamedev historically, but they do ensure it continues to be its mainstay. *today you can also add powerful SIMD and BLAS-adjacent abstractions to this list, a good showcase of which would be Bepuphysics2 which is a heavily vectorized physics engine written in pure C# that is as fast as PhysX and faster than Jolt (another SIMD-using physics library written in C++) https://github.com/bepu/bepuphysics2 https://github.com/bepu/bepuphysics2