[squeak-dev] Porting my programs from Squeak 3.10.2 to 3.5

David T. Lewis lewis at mail.msen.com
Sat Apr 4 18:33:15 UTC 2020


Hello Trygve,

On Sat, Apr 04, 2020 at 06:20:37PM +0200, Trygve Reenskaug wrote:
> Hi,
> I have been programming in Squeak3.10.2 for 10 years. Squeak 3.5 is a 
> great improvement from the old 3.10.2 and it is time to update all my 
> programs. There is a new VM that is different from the old. I'm used to 
> letting the file extension identify the appropriate program for handling 
> a file so I want to use a new file extension, /.image3/, for the /Squeak 
> Cog Spur Virtual Machine/.
> 
> ??It transpires that the String '.image' is embedded in any number of 
> methods. In my Fortran days,?? we learned to avoid embedded constants 
> because they had a tendency to change. (E.g., '3.14' to 
> '3.14159265358979323846' because we needed higher precision.)
> 
> Should I try to replace all embedded '.image' with a method call, e.g., 
> Smalltalk imageExtension?
> 

I think that using a message send would accomplish what you are trying
to do. However, I would suggest considering another approach. The actual
image file provides enough information in its file header to determine
the appropriate VM to use, so this provides one solution when the image
is started from a command script. Another approach is to bundle a
specific VM along with the image.

Can you say something about your preferred operating system? With
that information, it may be possible to suggest an approach that would
be convenient for you, and that will also be familiar to other users
of your programs.

Also, I am guessing that you intended to say "Squeak 4.5" rather than
"Squeak 3.5". Is that right? If so, then I would suggest moving to
Squeak 4.6 rather than 4.5. The differences are not great, but the
4.6 release can more easily but converted to the newer Squeak 5.n
series of releases if you or someone else decides to do another
update of your programs at a later time.

Dave



More information about the Squeak-dev mailing list