Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!ames!uhccux!munnari.oz.au!comp.vuw.ac.nz!comp.vuw.ac.nz!kjx From: kjx@comp.vuw.ac.nz (R James Noble) Newsgroups: comp.lang.smalltalk Subject: Smalltalk Implementation Queries. Message-ID: <1989Nov30.001121.29195@comp.vuw.ac.nz> Date: 30 Nov 89 00:11:21 GMT Sender: news@comp.vuw.ac.nz (News Admin) Reply-To: kjx@comp.vuw.ac.nz (R James Noble) Organization: Victoria University of Wellington, Wellington, New Zealand Lines: 85 In the process of attempting to write a Smalltalk virtual machine and compiler I have come across some quirks of Smalltalk and I would like to know what an implementation _should_ do. I am also interested in the opinion of some experienced Smalltalkers as to any changes or additions to Smalltalk that they might consider useful. I have access to both the Apple Lisa Smalltalk port, an Tim Budd's Little Smalltalk, items (a..c) below refer to these implementations. a) cascade message sends .. foo bar baz ; barf Is the message barf send to (foo bar), as per Blue book and Lisa, or (foo bar baz), like little Smalltalk ? b) blocks The [Miranda] article describes the standard problems with Smalltalk blocks. Is it worth the effort to make blocks fully reentrant and use standard static linkages? Are block temporaries a good idea? (Lisa implementation doesn't, Little Smalltalk copes with some tail recursion) c) modifying literals. The method tmp below. tmp | a | a _ #( 1 1 1 ). a at: 2 put: ( a at: 2 ) + 1. ^a. Three invocations will return (1 2 1) (1 3 1) (1 4 1). Would an implementation that returned (1 2 1) for all invocations be a bug or a feature. (Both Little Smalltalk and Lisa Smalltalk modify the literal each time). d) multiple inheritance. [Borning] describes a multiple inheritance scheme which is (I understand) now standard in ParcPlace Smalltalk. Is this now considered a standard part of Smalltalk? Could another implementation of multiple inheritance be substituted. e) class library How much does a Smalltalk class library need to conform to the Blue Book in order for the system to be usable as a Smalltalk? Which of the following categories could be redesigned without losing the feel of Smalltalk? Numbers and Magnitudes. Collections. Files and Streams. BitBlit graphics. Window System - MVC (Smalltalk/V has altered this). User Interface - browsers, inspectors. Kernel - classes and metaclass hierarchies. (Little Smalltalk modifies this) Kernel - contexts and processes. (Little Smalltalk modifies this) System Compiler & Support. (Little Smalltalk modifies this) f) other strange "features" - instance variable access only by message send (as per [Ungar]), with syntactic sugar to allow Smalltalk methods to compile. - support for one-of-a-kind objects. - altered metaclass hierarchy (a class would be a one-of-a-kind object) - multiple global namespaces (a.k.a. packages) - object destructors - when an object is garbage collected it can cause a message to be sent, for example to deallocate an external object (such as an X window). - anything else you can think of. Please reply by mail; I will summarise if necessary. -- [Miranda] BrouHaHa - A Portable Smalltalk Interpreter, OOPSLA87, p354 [Borning] Multiple Inheritance in Smalltalk-80, AAAI28 [Ungar] Self: The Power of Simplicity, OOPSLA87, p227 -- R James Noble Computer Science Department Victoria University, Box 600, Wellington 1, New Zealand kjx@comp.vuw.ac.nz ...!uunet!vuwcomp!kjx