News for hackers. Stuff that matters.
Re:Why Python 4.0 might never arrive, according to its creator by formerly_proven on Thursday June 03, 2021 @12:02PM (#27383360)
For example, in CPython multiple threads can append to a list without a lock or insert items into a dict without a lock, and the data structure will never become corrupted. If you do the same thing in Java with an ArrayList, there's a chance that some items are lost.

Though it is worth pointing out that Java has a well-defined memory model, and Python doesn't. So the above is true for CPython, but it might not work in other implementations, or, for example, you might have a library providing data structures, and it might not hold for those, either.

Re:Why Python 4.0 might never arrive, according to its creator by needusername on Sunday June 06, 2021 @04:10PM (#27415894)
> For example, in CPython multiple threads can append to a list without a lock or insert items into a dict without a lock, and the data structure will never become corrupted.

How is this achieved?

> Though it is worth pointing out that Java has a well-defined memory model, and Python doesn't.

Wouldn't you have to at least issue an mfence when a thread enters / exists the GIL?