178
submitted 6 days ago* (last edited 5 days ago) by Kissaki@programming.dev to c/rust@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] badmin@lemm.ee 4 points 5 days ago

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.

[-] LeFantome@programming.dev 2 points 4 days ago

I appreciate the reply

this post was submitted on 25 Feb 2025
178 points (99.4% liked)

Rust

6451 readers
52 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 2 years ago
MODERATORS