by matt_eeee · 6y ago · 0 comments
For example, GNU Smalltalk does not load the whole standard library from scratch when you start it, the way for example Python does when you "import os". In addition it's perfectly possible (or even common) to load more packages into the image so that any file-based scripts you launch load faster.
And even though by default the compiler is written in C, if you load the "Compiler" package then GNU Smalltalk switches on the fly to a parser and bytecode compiler that's written in Smalltalk. If you load the "Debugger" package, exceptions will take you to a gdb-like debugger, with a companion text-based interactive inspector. (The scheduler is part of the image in the same way as in Smalltalk-80, and features such as exception handling and the debugger are entirely implemented in Smalltalk; the only custom feature of the GNU Smalltalk VM that the debugger uses is single-stepping).
So even though the image is not as pervasive as in Smalltalk 80 or Pharo (development happens in files and builds upon an image, instead of happening straight in the image), the image is there and it's not just an implementation detail.
For example? Compared to what?
Getting rid of objects not belonging to the application to be deployed is difficult or impossible. According to my analysis of the original ST80 v2 virtual image there is a very high interdependency among objects; and since there is no static type information, many dependencies are not statically identifiable. There are also many objects that have not been created or initialized anywhere in the source code (neither in the sources file nor in the Bluebook interpreter), but on which the functionality of the system depends. Versioning of objects and corresponding source code is difficult, also combining a certain version of different components or communication drivers with other parts to be integrated, and so on.
> Compared to what?
E.g. Java or C++ or any technology with clearly identifiable compilation and configuration units.
1) So don't get-rid, now where is "the problem"?
2) So only add "belonging to the application" stuff to the base image.
> … objects that have not been created or initialized anywhere in the source code … but on which the functionality of the system depends.
3) So those are objects that will always be deployed, now where is "the problem"?
> Versioning of objects and corresponding source code is difficult…
So application source code isn't just text that can be saved in text files and versioned like other text files, and loaded into a Smalltalk image in a scriptable repeatable build process?