digitalmars.D - Joe Duffy's "Thoughts on immutability and concurrency"
- Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> Jul 28 2010
- Jesse Phillips <jessekphillips+D gmail.com> Jul 28 2010
- bearophile <bearophileHUGS lycos.com> Jul 28 2010
- Jesse Phillips <jessekphillips+D gmail.com> Jul 28 2010
This blog entry looks interesting: http://www.bluebytesoftware.com/blog/PermaLink,guid,7a57f623-d65d-4212-973d-29bdcf61dd3a.aspx Andrei
Jul 28 2010
Andrei Alexandrescu Wrote:This blog entry looks interesting: http://www.bluebytesoftware.com/blog/PermaLink,guid,7a57f623-d65d-4212-973d-29bdcf61dd3a.aspx Andrei
I must not be understanding something in his use of immutability. For his spellchecker example he suggested making a copy of some portion of the document into an immutable data-structure so that it can be shared without locks or copying. How is this better than message passing of mutable data? I suppose you can then pass this immutable structure to a spellchecker, grammar analyzer, and a haiku generator without multiple memory copies? In which case you're still assuming shared memory across threads or programs.
Jul 28 2010
Jesse Phillips:I must not be understanding something in his use of immutability. For his spellchecker example he suggested making a copy of some portion of the document into an immutable data-structure so that it can be shared without locks or copying. How is this better than message passing of mutable data?
To know the answer you need to know what a piece-table is, here you can find some info: http://www.cs.unm.edu/~crowley/papers/sds/node15.html You can find the missing images here: http://www.cs.unm.edu/~crowley/papers/sds.pdf Bye, bearophile
Jul 28 2010
bearophile Wrote:Jesse Phillips:I must not be understanding something in his use of immutability. For his spellchecker example he suggested making a copy of some portion of the document into an immutable data-structure so that it can be shared without locks or copying. How is this better than message passing of mutable data?
To know the answer you need to know what a piece-table is, here you can find some info: http://www.cs.unm.edu/~crowley/papers/sds/node15.html You can find the missing images here: http://www.cs.unm.edu/~crowley/papers/sds.pdf Bye, bearophile
Forgot to look that up after I had finished the article. Thanks for the links.
Jul 28 2010








Jesse Phillips <jessekphillips+D gmail.com>