On Thu, 18 Sep 2003, Andy Wardley wrote: > chromatic wrote: > > The thinking at the last design meeting was that you'd explicitly say > > "Consider this class closed; I won't muck with it in this application" > > at compile time if you need the extra optimization in a particular > > application. > > In Dylan, this is called a sealed class. It tells the compiler that it's > safe to resolve method names to slot numbers at parse time, IIRC. Seems > like a nice idea.
We'll probably have an optimizer setting for this so you can declare classes sealed at the end of compilation. Parrot'll have to have a means of yelling loudly (and probably throwing a fatal exception) if you try and alter a sealed class at runtime. This'll likely be a language-dependent setting, as some languages will seal classes by default, which makes some amount of sense in some circumstances. Dan