this post was submitted on 25 Feb 2025
181 points (100.0% liked)

Rust

6637 readers
226 users here now

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

Wormhole

[email protected]

Credits

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

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 3 weeks ago (1 children)

I am struggling to understand why you are getting downvoted.

[–] [email protected] 6 points 3 weeks ago (1 children)

I don't downvote people, but since you asked.

here has been a zlib in Ada for many years, doing its job quietly.

Who asked?

Speed comparable to the C version, probably not beating it, but not trailing by much in any case.

There is no one C version. The version being referred to is the original zlib, which happens to be the worst implementation of four possible zlib back-ends available in the flate2 crate. Besides the original zlib and zlib-rs, there is zlib-ng and cloudflare_zlib, both of which are also (still) implemented in C.

So being comparable to the original zlib is hardly something to shout about. In fact, individual hobbyists have been beating that implementation just for fun for many years.

Rust is safer than C but less safe than Ada from what I can tell.

Rust (edited for clarity) looks to me to be about halfway between C and C++ in complexity, with a bunch of footguns removed, and using implicit move semantics (“borrowing”) more than C++ does, and the notorious borrow checker is simply the compiler making sure you don’t make RAII mistakes because of that.

That's a lot of inaccurate waffling that could have been entirely written by an LLM, except it's probably too wrong for it to have been done so.

[–] [email protected] 2 points 3 weeks ago

I appreciate the reply