|
|
|
|
|
by Const-me
1983 days ago
|
|
> C# actually has unsafe too. An optional feature. Very useful for embedded and similar, but for general-purpose stuff like the web you never need anything unsafe. > it's pretty common in both of these languages for there to be C libraries involved somewhere in the stack. Negative. The complete stack is open source. You can browse the source code of the standard library at https://source.dot.net/ You only gonna find unsafe/dllimport for IO parts of that library where they integrate with file systems and such. All their core components are 100% managed code. |
|
Then there's crypto, for which the corelib defers to the OS (CNG / openssl) because doing crypto in managed code is hard.
But forget all that; even pure C# code isn't safe because it occasionally needs to hook into the CLR for unsafe things. Eg https://source.dot.net/#System.Private.CoreLib/Dictionary.cs... - unsafe code called from Dictionary.Remove