News for hackers. Stuff that matters.
Re:Why I’m dropping Rust by arbre on Sunday September 11, 2016 @03:22PM (#12475110)
I have been feeling that way ever since two years ago when I first looked at the language. I still don't understand why this language has such popularity. It's really bad for the reasons mentioned. C++ is a solid language where you can do everything you want and also write memory safe code in a clean way with unique_ptr. C++ is not perfect but to me no alternative come close yet, rust and go comprised.
Re:Why I’m dropping Rust by steveklabnik on Sunday September 11, 2016 @03:33PM (#12475174)
C++ is not memory safe, and neither is uniq_ptr. Use after move on one causes a segfault. (Actually IIRC it's UB, but it usually manifests as a segfault)
Re:Why I’m dropping Rust by trimbo on Sunday September 11, 2016 @04:44PM (#12475611)
It looks like clang-tidy just committed a check for this case: https://reviews.llvm.org/D23353
Re:Why I’m dropping Rust by steveklabnik on Sunday September 11, 2016 @04:52PM (#12475669)
Not exactly this case. From the link:

  > No warnings are emitted for objects of type ``std::unique_ptr`` and
  > ``std::shared_ptr``, as they have defined move behavior.
Regardless, I am happy to see more static checking for C++, and am following the GSL/Core Guidelines closely. It's important work.
Re:Why I’m dropping Rust by plandis on Sunday September 11, 2016 @05:07PM (#12475739)
You can write clean safe code in C++, Rust tries to turn that can to a must.
Re:Why I’m dropping Rust by pcwalton on Sunday September 11, 2016 @09:38PM (#12476663)
C++ is not memory safe. unique ptr provides no protection against dangling references. Besides, you cannot use unique ptr to make backreferences, which is what this article is complaining about.