A declarative model of Smalltalk (was Re: [DOCS] SUnit tests)
bitwize at snet.net
Sat Feb 22 09:00:50 UTC 2003
When the compiler and parser are tightly integrated with the runtime of the language, instructing the language to add program parts to its currently running program often becomes the norm, rather than crafting everything declaratively in an editor and then running it through a compiler.
Smalltalk appears to borrow a lot from LISP in this regard, at least in terms of philosophy if not implementation. In Scheme, for instance, the keyword define means "Add this symbol to your currently running global environment, and bind it to the following value..." LISPers tend to see this as an advantage.
The difference, if I surmise correctly, is that every Scheme knows what define means; the base semantics for the keyword are standardized -- whereas each Smalltalk has a different protocol for creation of classes and adding methods to them.
The Smalltalk situation is rather unfortunate, but I see not what having a separate declarative syntax for Smalltalk affords us; with a standardized imperative protocol for creation of classes, methods, and variables, the declarative syntax comes for free.
Jeffrey T. Read
"I fight not for me but the blind babe Justice!" --Galford
More information about the Squeak-dev