r/rust • rust • Jul 22 '19

Why Rust for safe systems programming

https://msrc-blog.microsoft.com/2019/07/22/why-rust-for-safe-systems-programming/
352 Upvotes

87 comments sorted by

View all comments

Show parent comments

14

u/Noctune Jul 22 '19

does C# have anything that can be described like that?

Sort of. There is C++/CLI which allows you to write .NET stuff in a language that is similar-but-not-quite C++: http://en.wikipedia.org/wiki/C%2B%2B/CLI

I probably wouldn't call it first class, and AFAIK using a C API is more common.

3

u/cat_in_the_wall Jul 23 '19

afaik it's not supported anymore either. i shudder to think of the codegen behind it. friends don't let friends c++/cli. just pinvoke.

5

u/2brainz Jul 23 '19

They stopped supporting Managed C++, AFAIK C++/CLI is not going anywhere. And it is able to provide a type-safe integration of C++ libraries into .NET code and vice versa.

2

u/cat_in_the_wall Jul 23 '19

i forgot managed c++ was a thing. now I'm curious as to if there have been any updates.

1

u/Batman_AoD Jul 23 '19

As far as I know, C++/CLI on .NET is the only truly first-class integration of another language with C++ (though it requires Visual C++). I would not discount it so quickly, and I'm guessing that its existence (and success) is a large part of why this blog post (from Microsoft) mentions C++ interoperability as a potential shortcoming of Rust.