[modules] {Image Shrink and Initialization}

Dave dave at bedarra.com
Tue Aug 21 22:05:01 UTC 2001


One other approach to keep from standing on your head is to keep the
load time initialization story very simple by first running an "install"
step to "bake" an
initialized image. Install can do other useful things like identify
machine type,
OS version, national language, directories etc. The separation of
install from
load/run allows components to be moved between systems; and binary
components to
be relocated etc. 



Marcio Marchini wrote:
> 
> > 2) Initialization order needs to be well defined and repeatable.  Team/V
> > and ANSI Smalltalk both claim this but only if a programmer completely
> > specifies the initialization order in some inconvenient way.  This is one
> > area where I think Java has done a better job.  The Java rule could be
> > loosely stated this way: a class is automatically initialized the first
> > time an executing method references the class by name.  I think
> > the Squeak
> > vm (or alternatively compiler) could be pretty easily adapted to support
> > this semantics.  If anyone wants to try let me know and I'll try
> > to provide
> > a more complete "specification".
> 
>         A bit of warning: the Java initialization is not that simple, because you
> need to detect cycles and also work despite concurrency. The Java spec has
> the steps necessary, and having implemented it myself I can say it is not
> that trivial, but once implemented you don't need to get back to it. But
> some people still don't quite understand how the initialization works,
> getting lost in the different initialization exceptions that can be
> triggered.
> 
> marcio




More information about the Squeak-dev mailing list