News for hackers. Stuff that matters.
Re:C++26 Disapproved by afdbcreid on Wednesday November 04, 2026 @05:54AM (#50363795)
Like?
Re:C++26 Disapproved by gmueckl on Wednesday November 04, 2026 @07:51AM (#50364851)
Algorithms that safely mutate the same data structure on multiple threads and do so safely because of some complex algorithmic properties that guarantee that the changes do not overlap?
Re:C++26 Disapproved by tcfhgj on Wednesday November 04, 2026 @08:22AM (#50365189)
Why can Rust not do that?
Re:C++26 Disapproved by gmueckl on Wednesday November 04, 2026 @08:50AM (#50365500)
How do you create shared mutable ownership of overlapping ranges of a single flat array in rust?
Re:C++26 Disapproved by tcfhgj on Wednesday November 04, 2026 @10:12AM (#50366699)
similarly except the algorithm to Mutex<[T]> and Arc?
Re:C++26 Disapproved by gmueckl on Wednesday November 04, 2026 @11:02AM (#50367509)
How does this work e.g. for an array of integers that several workers threads write to at random, non-overlapping positions?
Re:C++26 Disapproved by tcfhgj on Wednesday November 04, 2026 @05:50PM (#50372569)
1. by implementing your complex algorithm? 2. if they don't overlap, they can't be random, can they?

Rust can literally do anything programmatically. Idk why you think it cannot do something.

Re:C++26 Disapproved by gmueckl on Wednesday November 04, 2026 @11:55PM (#50375367)
They can be unordered, e.g. when reshuffling data into a new buffer based on a permutation that was computed separately. How do you avoid locking the output buffer in rust?
Re:C++26 Disapproved by tcfhgj on Thursday November 05, 2026 @12:56PM (#50382135)
Re:C++26 Disapproved by tcfhgj on Sunday November 08, 2026 @10:18AM (#50414013)
Re:C++26 Disapproved by afdbcreid on Wednesday November 04, 2026 @08:36AM (#50365335)
Rust can do that just fine. https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell..... "some complex algorithmic properties that guarantee that the changes do not overlap" are exactly the place to use unsafe and encapsulate it.

If you mean things that formally create a data race, then C++ cannot do that either.