From: Avi Bryant Date: 2005-04-10T03:04:42+09:00 Subject: Re: Seven new VMs, all in a row Nicholas Seckar wrote: > On Saturday 09 April 2005 12:17, Peter Suk wrote: > > Having your variables in a Hashtable is something I've heard of as a > > means of giving Java objects more reflective & dynamic capabilities. > > It is possible for Ruby objects to have a dynamic set of attributes. How do > you propose to handle calling instance_variable_set with random names on > objects? > > Would such an operation entail resizing every instance of that object's class? > Or would a hidden subclass be created, as can be done for singleton methods? > > Another option is to use slots for the attributes we know about and provide > hash based fallback for those which surprise us. All of these seem pretty reasonable; I expect you'd have to work really hard to find any program in the wild that would cause a problem for any of those approaches. (How many times does instance_variable_set get used with a value that is *never* referenced directly as @ivar?) It seems like these kind of details should probably be worked out in a private mailing list; Peter, is there one set up for Alumina? Or would you rather get further along before opening things up to kibitzing? Avi