Rust really isn’t all that. Plus C# is used for all kinds of corporate stuff where Rust levels of performance aren’t needed. It’s also used in several other game engines
Security, performance and most importantly, security. .net updates every week to address security vulnerabilities, stability and enhancements. While the language is lower you just can’t overstate poorly c# lasts. C# Deprecation and dated code make for a pretty high maintenance and frustrating ecosystem at the best of time.
It being updated frequently just shows it’s being regularly maintained and improved.
C# has many of the same security and safety advantages that Rust does given they are languages with memory management and other safety features built-in.
Rust has exactly the same problems with depreciation as many Frameworks rely on experimental features which are subject to change.
Edit: plus if you have ever used Rust it’s a pain to learn and use compared to C#. C# is so similar to Java and so much easier than C++ that it’s really not much of a jump for programmers new to the language.
.net is not secure, it’s so far from secure it’s a joke. 503 security patches this year alone, that includes one for each windows version but you get the point.
There are of course security flaws, we’re humans after all. Unless the compiler and the language can be proven mathematically correct at least.
But as described above, in practice the security flaws are easier to isolate in Rust compared to C# IME. The current story of security flaws in Rust is quite good so far.
The current story of security flaws in Rust is quite good so far.
That means nothing without knowing who said it. I find it hard to believe it’s anymore secure the C# without security research saying so. It’s a very complex language from what I understand with a lot of moving parts. It’s also dependant on external frameworks in a way that C# just isn’t. If you have a problem with .net there is a company behind it who is responsible. Who is responsible for actix web or seaorm?
Rust has exactly the same problems with depreciation as many Frameworks rely on experimental features which are subject to change.
Rust has actually quite a good record with depreciation and backwards-compatibilty etc. They are changing the language in non-backwards compatible way over editions, but the changes are mostly very manageable.
But to not end up being another C++ (syntax-wise it’s a disaster IMHO), a few non-backwards-compatible changes every few years are the way to go, when it’s manageable.
I’m not speaking for Rust level performance. I’m using Rust nowadays, because it’s generally doing a lot right, that other popular languages struggle with IMO.
Think about error handling. I think even Java is better here than C#. I think it’s quite a mistake, not being required to add all possible exception types that a function can throw to the function signature.
Then the next thing, I really hate about almost every popular language is implicit null. To be really safe, you have to check every (non-primitive) variable for null before using it, otherwise you have a potential NullPointerException.
Then take pattern matching, this is a baked in feature of Rust from the beginning and it does this really well (exhaustive matching etc.).
There’s “basic” pattern matching in C#, but it just doesn’t really feel right in the language, and is not even close in capability compared to Rusts.
All of this (and more) makes Rust the less error-prone language, which I can say with confidence after long experience with both of these languages (both > 5 years).
I’m honestly not sure why exactly C# was chosen for most of the games, but it’s probably because it’s relatively good to embed, is relatively strong-typed, while being somewhat performant (compared to something like python or other scripting languages).
Rust really isn’t all that. Plus C# is used for all kinds of corporate stuff where Rust levels of performance aren’t needed. It’s also used in several other game engines
Security, performance and most importantly, security. .net updates every week to address security vulnerabilities, stability and enhancements. While the language is lower you just can’t overstate poorly c# lasts. C# Deprecation and dated code make for a pretty high maintenance and frustrating ecosystem at the best of time.
It being updated frequently just shows it’s being regularly maintained and improved.
C# has many of the same security and safety advantages that Rust does given they are languages with memory management and other safety features built-in.
Rust has exactly the same problems with depreciation as many Frameworks rely on experimental features which are subject to change.
Edit: plus if you have ever used Rust it’s a pain to learn and use compared to C#. C# is so similar to Java and so much easier than C++ that it’s really not much of a jump for programmers new to the language.
.net is not secure, it’s so far from secure it’s a joke. 503 security patches this year alone, that includes one for each windows version but you get the point.
Rust 2.
Do you not think Rust also has security flaws? At least Microsoft patch theirs.
There are of course security flaws, we’re humans after all. Unless the compiler and the language can be proven mathematically correct at least.
But as described above, in practice the security flaws are easier to isolate in Rust compared to C# IME. The current story of security flaws in Rust is quite good so far.
That means nothing without knowing who said it. I find it hard to believe it’s anymore secure the C# without security research saying so. It’s a very complex language from what I understand with a lot of moving parts. It’s also dependant on external frameworks in a way that C# just isn’t. If you have a problem with .net there is a company behind it who is responsible. Who is responsible for actix web or seaorm?
Rust has actually quite a good record with depreciation and backwards-compatibilty etc. They are changing the language in non-backwards compatible way over editions, but the changes are mostly very manageable.
But to not end up being another C++ (syntax-wise it’s a disaster IMHO), a few non-backwards-compatible changes every few years are the way to go, when it’s manageable.
What’s so confusing about C++ syntax exactly? To me it seems to make a lot of sense given the languages history.
I’m not speaking for Rust level performance. I’m using Rust nowadays, because it’s generally doing a lot right, that other popular languages struggle with IMO.
Think about error handling. I think even Java is better here than C#. I think it’s quite a mistake, not being required to add all possible exception types that a function can throw to the function signature.
Then the next thing, I really hate about almost every popular language is implicit
null
. To be really safe, you have to check every (non-primitive) variable fornull
before using it, otherwise you have a potentialNullPointerException
.Then take pattern matching, this is a baked in feature of Rust from the beginning and it does this really well (exhaustive matching etc.). There’s “basic” pattern matching in C#, but it just doesn’t really feel right in the language, and is not even close in capability compared to Rusts.
All of this (and more) makes Rust the less error-prone language, which I can say with confidence after long experience with both of these languages (both > 5 years).
I’m honestly not sure why exactly
C#
was chosen for most of the games, but it’s probably because it’s relatively good to embed, is relatively strong-typed, while being somewhat performant (compared to something like python or other scripting languages).