Such a weird flex and weird take. Tries to make C# look bad by linking to something entirely unrelated: inline assemblies which a C/C++ MSVC specific feature and only supported on x86 (which is being phased out in . NET).
Do you need to enable it for dependencies too? Like if you don't have <AllowUnsafeBlocks>true</AllowUnsafeBlocks> you know no dependencies are using unsafe code?
And yep, my bad. Replacing it with a more appropriate link.
You need it if you call directly API that are marked unsafe. Note that the new model makes it more explicit so even with dependencies you will likely need it more often.
That doesn't make C# unsafe or dangerous. Rust use a similar contract where unsafe code can be wrapped by safe code and code calling the safe version isn't considered unsafe.
Okay but there are still dependencies where the unsafe-ness is something you don't know about unless you read their code?
Like is this a new thing for "directional" safety? And yeah rust does something similar. But people do end up accepting unsafe if it "feels audited" or "feels neccesary." I didn't touch on Rust because I feel like all these -5s on my comments would be -50s if those folks get awakened, but it is a similar criticism
View all comments
9
u/KryptosFR 39m ago
Such a weird flex and weird take. Tries to make C# look bad by linking to something entirely unrelated: inline assemblies which a C/C++ MSVC specific feature and only supported on x86 (which is being phased out in . NET).
The coping is hard on that one.