this post was submitted on 22 Sep 2023
43 points (97.8% liked)

Rust

5999 readers
21 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] BatmanAoD@programming.dev 5 points 1 year ago

That's an extremely niche set of requirements, largely because interoperating with C++ is, well, a nightmare, and partly because "fast code" means something very different to C++ devs than to most devs who use managed runtimes.

Also, there are different definitions of "safe". Rust takes a very C++ style view: it's "safe" in the sense that UB requires either a compiler bug or an explicit opt-in to something unsafe.

For other definitions of "fast" and "safe", sure, most garbage collected languages count. Java, C#, and Go are "fast enough" for most application code, and they mostly guarantee that errors will result in crashes rather than UB. Zig is as fast as C/C++/Rust (and integrates much more easily with C than any other language except C++) and has a very different approach to safety (mostly runtime checks in debug mode that are not included in release mode).