Comment

Comment by Panzerschrek

Porting Rust enums and pattern matching isn't necessary (C++ already has std::variant).

Lifetime parameters aren't necessary, lifetime contracts may be implemented in a different and much easier way. This may be expressed in form of a function attribute, which may be calculated via constexpr code.

Special operators for borrowing just add more complexity. C++ already achieves same behavior by normal references (which may be mutable and non-mutable).

Introducing immutability by default isn't strictly necessary for achieving safety. C++ developers are already mostly fine writing "const" almost everywhere.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton