On Thu, Oct 17, 2013 at 11:21 PM, Jonathan S. Shapiro <[email protected]>wrote:
> So just to be clear, I'm talking about objects that are immutable, rather > than objects that allegedly implement read-only semantics. > The list i posted were all only data entered by the constructor with no change of state .. I used RW ( and RO ) because i suggested all functions default to shallow const/immutable params for references ( ro) and mut is 3 characters rw is 2 (and probably easier for most progammers to grasp as it would be very common). > On Wed, Oct 16, 2013 at 8:29 PM, Bennie Kloosteman <[email protected]>wrote: > >> I dont think the pay off will cover the costs but it may , there are >> many other benefits to knowing objects will not changes. >> > > For dynamically immutable objects (so RO here is a per-object property), > the main cost is a bit in the object header. Those bits are precious, so it > definitely needs an experiment. > > For objects that are immutable by virtue of their static type, the bit can > be tucked in the vtable. Those bits are a lot cheaper. > If its only 20 objects at a time you dont need this at all just lookup the type .. Obviosuly for URC when you do a whole nursery its a diffirent story.. > > Hmm. For that matter, you could simply use VTable pairs for dynamically RO > objects (one indicating RO, the other indicating RW). > I was thinking of this for DB objects as well. Ben
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
