News for hackers. Stuff that matters.
Re:No-GIL mode coming for Python by pseudocomposer on Saturday July 29, 2023 @12:58AM (#36917103)
I agree that Rust handles concurrency about as well as Java (in addition to its memory safety). But could you provide docs on Erlang or Haskell concurrent data structures that were better than Java’s, say, 10-20 years ago? Java’s support for concurrent data structures was pretty unprecedented in its heyday.
Re:No-GIL mode coming for Python by quickthrower2 on Saturday July 29, 2023 @02:17AM (#36917447)
STM, 2006? https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.67...

Still way after Java was released I guess

Re:No-GIL mode coming for Python by grumpyprole on Saturday July 29, 2023 @03:57AM (#36917949)
Java didn't initially ship with lock-free data structures, those came later thanks to Doug Lea.
Re:No-GIL mode coming for Python by seanhunter on Saturday July 29, 2023 @03:25AM (#36917777)
The best example of this is probably the “Beautiful Concurrency” paper from Simon Peyton-Jones in 2007 https://www.microsoft.com/en-us/research/wp-content/uploads/...
Re:No-GIL mode coming for Python by SkiFire13 on Saturday July 29, 2023 @03:47AM (#36917891)
Compared to those other languages, Java has no mechanism to enfore the use of concurrent data structures, it's entirely up to the programmer to use them.
Re:No-GIL mode coming for Python by grumpyprole on Saturday July 29, 2023 @03:48AM (#36917905)
Java still doesn't provide persistent data structures out-of-the-box. IMHO these are more important than lock-free mutable data structures.

When one really does need shared mutable state. Haskell supports transactional updates to mutable state (STM), with optimistic locking and rollbacks. It's awesome, but unfortunately just not practically possible in any language with rampant uncontrolled side-effects.

Re:No-GIL mode coming for Python by Arch-TK on Saturday July 29, 2023 @06:48AM (#36918896)
Erlang processes are a first class object. Data is immutable. There's a special syntax for sending and receiving messages between processes.

I would say that in some ways this is simply incomparable to java but I think this concurrency model is probably the easiest and simplest to work with of any concurrency model.

There are obviously drawbacks like with anything but for a lot of situations it's an excellent choice.