← Back to context

Comment by ogoffart

1 day ago

> Rust claws at market share but has problems with basic stuff like doubly linked lists, WIP gccrs and memory unsafety,

Doubly linked lists aren’t that important today. Rust doesn’t need gccrs to be useful, and it gives much better memory safety than C++ without needing a GC. So I find your criticism of Rust seems a bit weak. Rust is a strong alternative to C++.

> Doubly linked lists aren’t that important today.

I guess Rust is just not a viable or good language if one cannot even implement easily something as basic as a doubly linked list. Doubly linked list is the bare minimum; if that is not easy to implement, more complex data structures will often be even worse.

Rust, contrary to public claims, often does worse on memory safety than C++, which is a sad state of affairs.

I fear my arguments are way stronger than yours, sorry. Please make it easier to implement data structures in Rust.

  • > Rust, contrary to public claims, often does worse on memory safety than C++, which is a sad state of affairs.

    Nonsense! Where do you get that from?

    Aslo, you can make easily make linked list, it's just not a recommended data structure.

    • On memory unsafe Rust: It tends to come crashing down when unsafe is necessary, for both reasoning about unsafe is harder than in C++, and the rules for unsafe in Rust is an active area of research. Do you know all the intricate rules of unsafe (not all which have been defined), can you reliably predict what is safe and what is not without using Miri? Miri that cannot test all? Are you an expert on aliasing and pinning? Can you describe what tree borrows are?

      On doubly linked lists: Sorry, but to implement a doubly linked list in Rust well, you have to go through trials and tribulations. A whole book was written about an epic of implementing doubly linked lists in Rust: https://rust-unofficial.github.io/too-many-lists/ . And if all that is required for a data structure as simple as a doubly linked list, what will then be required for some of the more complex data structures?

      1 reply →