<audreyt> Limbic_Region: well, the point is valid, that share-everything has drawbacks
<audreyt> STM fixes the drawbacks to a degree but still if you can design the code to share nothing, the better
<audreyt> not really sensational:)
<allbery_b> he's right, share-nothing is ideal. so's world peace. both are about equally likely...
In other words...
audreyt on 2007-02-09T23:39:33
It's not really "STM has huge drawbacks as a basis for concurrency", but rather "sharing data among concurrent processes creates complexity" -- In practice, when it's desirable to have _some_ data shared, STM is one of the best way we know about to manage that complexity.Re:In other words...
chromatic on 2007-02-10T19:17:37
Agreed. The goal here in language design may be to encourage shared-nothing where it's appropriate (that is, almost everywhere) and making shared-something much less dangerous where it's absolutely necessary.
Re:In other words...
audreyt on 2007-02-11T03:43:12
Yup. And I think havingfork
andasync
being the triggers for the two sharing models, respectively, and enable "my $x is shared" work transparently across forked processes, may be a fruitful way to go.Also, GHC 6.8 will come with a unified thread/event model that let people flip between explicit-sharing event "view" and implicit-sharing thread "view" freely, instead of maintaining an adhoc per-thread event queue; this also greatly simplifies asynchronous programs, while preserving linearly-scalable SMP performance.