logo       

Image vs. source code (was Re: Very Basic Squeak information): msg#00146

lang.smalltalk.squeak.beginners

Subject: Image vs. source code (was Re: Very Basic Squeak information)

On Nov 20, 2006, at 23:13 , goran@xxxxxxxxx wrote:
Yes, the image is like a "snapshot" of RAM with live objects in it. So
an image is not the same thing as for example a jar-file in the Java
world which is just a bunch of class definitions - not objects.

That's a thing you have to deeply understand. In all object-oriented systems that are *not* image-based (which is the huge majority), you always start at the Big Bang - every time you run the program, it defines classes and creates instances until it can finally start servicing the user. Not so in Smalltalk - we make a snapshot of all the object instances that are already fully initialized and save it to disk. Running that image again just resumes execution wherever it was frozen.

Indeed, the last time objects were created "from scratch" in Squeak was like 30 years ago! From then, it's a continuous creation and destruction of objects inside the system, snapshotted to disk from time to time and passed to other people.

The objects in the image are the essence of Squeak, source code is just a temporary artifact. You cannot recreate a Squeak image from source-code alone, because in source-code only a few selected kinds of objects are preserved. Source-code pretty much is just a textual serialization of all instances of ClassDescription and its subclasses.

- Bert -


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise