3 ms·
> Do you believe this problem is better or worse in Rust compared to other languages? Unlike other languages, Rust still has borrow checking to go after all th
by edflsafoiewq 7y ago
> Do you believe this problem is better or worse in Rust compared to other languages?
Unlike other languages, Rust still has borrow checking to go after all the type errors are gone.
- pjmlp 7y agoAn idea currently being added to Swift, C++ (via static analysis, core guidelines lifetime profile), Ada/SPARK, D, OCaml and Haskell, originally developed in Cyclone, further explored in ATS. So that "Unlike other languages" isn't quite true. What Rust has done, was to prove it is viable to push such ideas into mainstream computing.
- pcwalton 7y agoThis is incorrect. Neither Cyclone nor ATS had borrow checking. In fact the ATS author at one point dismissed borrow checking as too inflexible. The borrow checker is actually original, though based on known techniques. Specifically, the original part is that it allows the per-use-site choice of aliasing vs. mutability instead of making the decision globally.
- pjmlp 7y agoI might be wrong on the origins, but I am certainly right that everyone else is now adopting similar algorithms. So while it is great that Rust is making these concepts mainstream, in about 5 years time, the other languages will have their New Jersey style implementations mature and available for their communities.
- pcwalton 7y agoBorrow checking cannot be soundly added to C++, or most other languages, for systematic reasons. Soundness isn't a theoretical property here: C++ has constantly been adding things that make it safer as opposed to making it safe, and memory safety problems are still a huge issue. See "Safe C++ Subset is Vaporware" by Robert O'Callahan: https://robert.ocallahan.org/2016/06/safe-c-subset-is-vapourware.html https://robert.ocallahan.org/2016/06/safe-c-subset-is-vapour...
- pjmlp 7y agoWhy do you think I mentioned New Jersey style implementation? Google and Microsoft are the ones driving that effort, in what concerns C++. That vapourware is quite welcomed when using DriverKit, Unreal, COM/UWP, Project Treble drivers,..