Self and Smalltalk (was: a small arrows prototype)
RE01 Rice Brian T. EM2
BRice@vinson.navy.mil
Sat, 15 May 1999 18:55:27 -0700
> As some of you know, Self 4.0 is fully compatible with GNU Smalltalk
> thanks to the work of Mario Wolczko. One project I have for the
> future is to change that so Self is compatible with Squeak sources
> instead. If I'm lucky, someone else will do this before I get around
> to it. Anyway, programming in Squeak now might turn out to be a great
> way to run it in Self later.
>
cool. actually, programming the arrow system would probably be much simpler
to do in self than in smalltalk, so that the translation issue may be moot.
> I don't know what you mean by "forcing inheritance", so didn't
> quite get your problem. While it probably isn't what you want, a
> way to represent infinite sets or collections with objects is to
> use a "helper" object to access them indirectly (called Stream in
> Smalltalk-80 and Generator in Little Smalltalk). Then the helper
> object can have an algorithm for creating the elements on demand
> instead of retrieving them from memory. Due to object encapsulation,
> the application will never know the difference.
>
i hadn't looked at the stream class very closely, since i hadn't considered
algorithms as I/O sources for streams. thanks.
> > (the goal is to represent higher-order infinities and compare them and
> > reason about them. i have the feeling that such a system might easily
> help
> > out an ordinary system like Self, Smalltalk, Lisp, or Scheme in the ways
> of
> > reflection.)
> Streams are no good for this, but the Generators could be compared
> and manipulated in limited ways. But I think we are talking about
> different things...
>
actually, if the source of the algorithm were available (first-order wise)
for manipulation, then the system might be able to study it for its "size".
this suggests to me to be direct about using arrows themselves for "arrow
code", shortcutting some hacks that i was considering to make the system
dynamic.
> I am a big LISP/Scheme fan, and the only thing I miss about LISP
> is the ability to manipulate code (Scheme doesn't have that either,
> if I remember correctly). You can *generate* code in Self/Smalltalk
> if you are willing to work at the source text level and I have been
> pleasently surprised at how well this works in practice. Of course,
> it might be that none of this will be needed for Arrows.
>
it seems that arrow enables the lisp and self paradigms to merge in that way
(allowing trivial code generation as well as behavioural definition of
objects). you might call the arrow system a HyperSelf system.