24 points · by luu · 3y ago · 8 comments
If this means what I think it does, it's wrong. This was written in 2010. Concurrency was everywhere by then. I mean it was everywhere for many years in databases, web servers, parallel compiles, all sorts of high performance computation from supercomputers to that SETI program. But by 2010 even desktops and laptops had several cores. git could use several threads, so could web browsers, video games.
edit: one of the hazards is exceptions, but the obvious fix of 'no non-local control flow' somehow doesn't seem to be on the table.
YMMV of course, nah just be the nature of code I’ve written or looked at.
So you're paying that very hefty performance price for something that you can't use most of the time.
End-to-end ST could give all the same safety guarantees as e.g. Rust, but packaged in a mental model that is easier to teach and much, much easier to write code for. Even if it means, say, a 10x slowdown, I think that there are many use cases where this would be acceptable if it meant significant improvements in safety.
The problem is the end-to-end part. You don't just need STM - ideally, you need everything that the code can do to be transactional, including any other system that it interacts with in a way that causes a state change. This isn't feasible, so in practice you have to restrict STM to a subset of code which does not perform operations that cannot be rolled back. But with any existing platform, it ends up being such a small subset that it's not worth the bother; and even if you disregarded backwards compatibility and designed something from scratch specifically for end-to-end ST, it would still be limited wrt networking.