News for hackers. Stuff that matters.
Re:Go's Concurrency Examples in Java 19 by Cthulhu_ on Wednesday May 04, 2022 @04:58AM (#31258179)
I wonder if that's on purpose, to find bugs earlier. I know that the implementation of map in Go will intentionally shuffle the keys when you try to iterate over them, so that you never accidentally rely on insertion order.
Re:Go's Concurrency Examples in Java 19 by dgb23 on Wednesday May 04, 2022 @06:12AM (#31258529)
It's very much on purpose, just like default maps being unordered. People should not rely on the ordering as it breaks the semantics of these features according to Go. It fits the Go philosophy well.
Re:Go's Concurrency Examples in Java 19 by Strum355 on Wednesday May 04, 2022 @06:25AM (#31258602)
Its non deterministic on purpose because thats how its required to be to fit the model of CSP (communicating sequential processes)
Re:Go's Concurrency Examples in Java 19 by yakubin on Wednesday May 04, 2022 @05:07AM (#31258220)
I've read somewhere (possibly when Go came out) that it's on purpose. For fun, Alan Cox once made a post on Google+ (RIP) showing a crappy random number generator based on Go's select.