Earlier quoted context omitted.
The reasoning behind switching to C++ today rather than Rust, Zig, or any other language is familiarity. C++, while it currently doesn't have memory safety, is extremely easy for any C programmer to ease into, especially given the limited subset that Anvin is proposing for kernel use. Meanwhile, Zig and Rust look absolutely awful. As somebody who's been using C++ for eight years, I despise Rust and Zig (and Nim and..…
This feels like a personal statement of familiarity rather than looking ahead to designing a language that has to be taught to next generation of software engineers. AFAIK, the only operator Rust introduces over C++ is the try operator (aka. ?) and match statements. Furthermore I can't imagine how someone could prefer &&auto my_closure = [&](int x, int y) { return x + y } to just let my_closure = |x: int, y: int| { x…
auto my_closure = [](int x, int y) { return x + y; };
let my_closure = |x: int, y: int| { x + y }
and frankly, the option of an explicit capture-list with aliases and mixing moves and copies is a benefit: int sum = 0, diff = 0;
auto adder = [&sum](int num) {
sum += num;
// compilation error, author didn't
// mean to capture diff.
diff -= num;
};