[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obfuscated Self Date: Mon, 25 Jul 94 11:05:22 EST From: jecel@lsi.usp.br (Jecel Mattos de Assumpcao Jr.)



**> On Mon, 25 Jul 94 17:59:35 BST, dib@signal.dra.hmg.gb (David Bruce) said:
  David>    A few people have tried to convince me to create a simple PC based
  David>    implementation of Self and include it for free in a book for novices
  David>    to spread out the word :-). I don't know if it is a good idea - Little
  David>    Smalltalk and GNU Smalltalk leave many people with a bad impression
  David>    of the language.

  David> Just out of interest, what's the problem: functionality or efficiency?
  David> I'm not so familiar with {Little,GNU} Smalltalk; are they hopelessly
  David> `cut-down' versions of the real thing (cf. microemacs :-)), or just
  David> very very slow?

Both are, as I recall, hopelessly cut down. GNU Smalltalk includes an
interface to the X Protocol but nothing more in terms of environment.
Last I heard, Little Smalltalk was missing important things like
instance variables :-)

  David> I know that an efficient implementation of Self is decidedly non-trivial,
  David> but surely the point of the language is that it is simple and so could be
  David> implemented naively (e.g., as an interpreter) without an enormous effort
  David> (though not necessarily by a novice!).

An interpreter for the general ideas behind Self objects _is_ trivial
-- a good hash table and a polymorphic "evaluate" function is most of
it. Some pain, perhaps, to handle arguments. But most of the work
would be in providing all the primitives and making sure that the
standard libraries all worked (e.g., large integers, etc.).

  David> This raises the following question (for instructors, I guess):
  David> how slow a system could one `get away with'?

Craig Chambers' thesis cited estimated speeds for a purely interpreted
Self as beening about forty times slower than compiled C code. Is this
acceptable?  Eh, I don't know. Certainly, we've never had a system
fast enough to make us really happy for instruction....


Brook