In your opinion.
Some of us believe the exact opposite.
By exact opposite you mean that when Java just came out ('I got an early look at Java, [...]') had good concurrency support?
One can make a solid argument that modern Java is adequate. But I don't buy you believe that of early Java?
Re:No-GIL mode coming for Python
by soulbadguy on Friday July 28, 2023 @11:19PM
(#36916527)
There are a lot of good things about java (and the jvm by some extend), but good concurency is not one of them.
Re:No-GIL mode coming for Python
by bitcharmer on Saturday July 29, 2023 @03:35AM
(#36917821)
This is not true. JSR-133 was one of the first and most prominent implementation of memory model among general purpose languages. You don't seem to know enough about the platform and it's history to make definite statements like that, imo.
Re:No-GIL mode coming for Python
by grumpyprole on Saturday July 29, 2023 @05:27AM
(#36918433)
JSR-133 was quite a few years after Java's release. But even after these changes, many problems remained. For example, standard library classes were often not thread safe out-of-the-box, even something seemingly innocuous like a date formatter class would malfunction in a threaded context. The rules around thread safety were also very complex, especially with regard to constructing objects. IMHO, it did not compare well with other languages around the time built with concurrency in mind, for example Erlang. I was once very fortunate to meet Joe Armstrong and we briefly discussed Java, suffice to say he was not impressed by it.
Re:No-GIL mode coming for Python
by soulbadguy on Saturday July 29, 2023 @10:19AM
(#36920574)
+1
Re:No-GIL mode coming for Python
by ungamedplayer on Saturday July 29, 2023 @12:31AM
(#36916946)
Old mate isn't alone.
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/...
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.
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.
Re:No-GIL mode coming for Python
by almostnormal on Saturday July 29, 2023 @02:38AM
(#36917547)
* * *
And Java doesn't even have good (conceptual) support for concurrency. Compared with eg Erlang, Rust or even Haskell.
But Java was still better at it than C or C++ at the time.