From: Peter Suk Date: 2005-04-09T02:55:54+09:00 Subject: Re: Seven new VMs, all in a row On Apr 8, 2005, at 7:54 AM, Glenn Parker wrote: > Avi Bryant wrote: >>> - instance variables that don't need to be predeclared with the class >> Not exactly as Ruby does, but you can simply add new instance >> variables >> to the class definition whenever you compile a method that uses a new >> one. > > Isn't that jumping the gun just a bit? An instance variable (in Ruby) > should not exist in an object until the line that assigns/creates it > is actually executed. It's a subtle point, but it could impact some > types of reflective programming. Maybe you can mask its existence > somehow? I've been giving this some thought. There's no reason why we can't create ST instance vars at runtime. However, it will mean deferring compilation. The suggestion to mask its creation is a good one from a performance standpoint, and is certainly doable. --Peter -- There's neither heaven nor hell, save what we grant ourselves. There's neither fairness nor justice, save what we grant each other.