News for hackers. Stuff that matters.
Re:Apple is rewriting Foundation in Swift by astrange on Sunday May 21, 2023 @10:58PM (#36026956)
It could catch them before that using ownership, at the cost of lower performance.

Though Swift concurrency is mostly about "concurrency" not "parallelism", which is the one that has data races.

Re:Apple is rewriting Foundation in Swift by saagarjha on Monday May 22, 2023 @02:07AM (#36027983)
Ownership hasn’t shipped yet.
Re:Apple is rewriting Foundation in Swift by astrange on Monday May 22, 2023 @04:50AM (#36028877)
It has an ABI-level ownership thing already. What's missing is ways to control it.
Re:Apple is rewriting Foundation in Swift by tialaramex on Monday May 22, 2023 @01:58PM (#36034550)
If your concurrency strictly can't involve parallelism then sure, no data races, but also then your performance is miserable on modern hardware.

If your concurrency can invoke parallelism, then you need to explicitly protect against data races, or else you need to define what happens (Java does this, nobody else has) or else you shrug and say too bad now the program is nonsense, you lose (C, C++, Go, many modern languages do this, it is easier)

Re:Apple is rewriting Foundation in Swift by astrange on Tuesday May 23, 2023 @01:27AM (#36040219)
> If your concurrency strictly can't involve parallelism then sure, no data races, but also then your performance is miserable on modern hardware.

Often worth it when that hardware is battery-powered though. Using those extra cores isn't free.