|
From: Avi B. <av...@be...> - 2004-04-07 07:58:59
|
On Apr 7, 2004, at 12:22 AM, Craig Latta wrote: > I added a few things to the swiki page, I'll repeat them here = for the > sake of discussion. Under the heading "Facilitate a number of > anticipated extensions to Squeak": In a similar vein: since I added something to the swiki about an=20 immutability bit, I'll bring it up here as well. As I think G=F6ran=20 already mentioned, the most interesting use is in transactional=20 systems: these need to be able to find out, for some group of objects,=20= which of them has changed state since some point in the past. =20 Currently, the usual pattern is to store a copy of every object in the=20= group when the transaction begins, and then scan through them when the=20= transaction ends looking for changes. This is, of course, generally=20 pretty slow, especially if you're trying to manage large chunks of the=20= image transactionally. Having an immutability bit allows a for much=20 more efficient approach, and has some other nice uses too (I very much=20= like, for example, that objects in the literal frame of a VisualWorks=20 method get marked as immutable). The real question, I guess, is=20 whether transactional systems are considered an important enough set of=20= applications to use a whole header bit to optimize them. Since I=20 mostly work on business applications, which usually need transactional=20= behavior, my bias is that they are important enough, but obviously not=20= everyone will think so. Avi |