News for hackers. Stuff that matters.
Re:A Rust Shaped Hole by uecker on Wednesday July 16, 2025 @03:46PM (#44586071)
For C++, just take lambda captures, you can do [&], [=], [a], [&a], [a = b] (and I probably forgot half), the many way you can do initialization in C++ became a meme, but it really permeates the whole language whose design is driven by enthusiasts and people who have an interest to make it more complex (trainers, book authors, consultants, etc.)

For Rust, I think it is a bit of a different story and it is harder to point to specific features. The language is clearly much better designed (because it was more designed and did not evolve so much) and because of its roots in functional programming. Just overall, the complexity is too high in my opinion and it a bit too idealistic and not pragmatic enough.

Re:A Rust Shaped Hole by LoganDark on Wednesday July 16, 2025 @10:46PM (#44589209)
> it a bit too idealistic and not pragmatic enough

This is an ideal programming language for certain types of people. It also gives the programming language certain properties that make it useful when provable correctness is a concern (see Ferrocene).

Re:A Rust Shaped Hole by AlotOfReading on Thursday July 17, 2025 @12:06AM (#44589618)
Last time I talked to the ferrocene people they had no plans to do anything with formal methods. Has their scope expanded?
Re:A Rust Shaped Hole by _flux on Thursday July 17, 2025 @05:44AM (#44591484)
Maybe it was intended to refer to RustBelt.

I haven't been following their work, though. It seems they are working on stacked borrows.

Re:A Rust Shaped Hole by steveklabnik on Thursday July 17, 2025 @12:36PM (#44595176)
> I haven't been following their work, though. It seems they are working on stacked borrows.

We're a few years past that, there's now 'tree borrows' which just had its paper published: https://www.ralfj.de/blog/2025/07/07/tree-borrows-paper.html

Re:A Rust Shaped Hole by LoganDark on Thursday July 17, 2025 @07:43AM (#44592207)
Sorry, I didn't mean provable correctness as in using formal methods, I meant it in terms of far stronger compiler guarantees about especially things such as memory safety. I also personally find Rust code far more pleasant to write and to reason about compared to C/C++ because of how well-defined and consistent it is.
Re:A Rust Shaped Hole by bfrog on Wednesday July 16, 2025 @10:52PM (#44589230)
The language is highly productive, it’s pragmatic enough. There’s no perfect language until our brains can directly describe what we want a machine to do without intermediary translation layers like C.
Re:A Rust Shaped Hole by saagarjha on Thursday July 17, 2025 @04:09AM (#44590910)
I think captures are mostly reasonable and fine (and other languages have similar constructs). Initialization is completely broken, yes.