• badmin@lemm.ee
    link
    fedilink
    arrow-up
    6
    arrow-down
    2
    ·
    2 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.