What do you think about Ruby ?

Alan Lovejoy squeak-dev.sourcery at forum-mail.net
Sun Aug 7 19:18:47 UTC 2005



Smalltalk is the most highly polymorphic language in general use.  It
achieves its high level of polymorphism by means of the uniformity and
consistency of its denotational semantics: All values are objects. All
operations are performed by sending messages to objects (with the exception
of assigning a value to a variable and sending a message--although you can
in fact send any message by sending some variation of the #perform:
message.)

Unlike most other languages, Smalltalk does not destroy its polymorphic
nature by violating object encapsulation.  For example, static type checking
violates object encapsulation, both because it wrongfully confuses variables
with values (a fatal criticism that applies to all statically-typed
languages,) and because (as usually implemented) it exposes the class of an
object outside its "black box."

Polymorphism is the fundamental characteristic that enables and abets
abstraction: lack of polymorphism is what inhibits the ability to write
abstract classes and methods that can be reused in the widest possible
contexts.

Smalltalk is also the most highly introspective/reflective language in
general use.  This acts synergistically with its highly polymorphic nature
to create a language more powerful and useful than one might expect when
considering polymorphism and reflection separately.

As for Ruby, I don't know a lot about it.  But from what I gather, by
comparison to Smalltalk it's far less mature, is a lot slower (a consequence
of the relative difference in maturity,) is syntactically more complex and
less uniform (and so is less polymorphic,) and lacks key aspects of
Smalltalk's reflective capabilities.  On the other hand, Ruby's current
implementations/IDEs (as opposed to the language per se) appear to be better
targeted at scripting than is the case for most current Smalltalk
implementations/IDEs (as opposed to Smalltalk as a language per se.)

However, it would be far easier to produce a Smalltalk implementation/IDE
that would work well as a scripting language than it would be to make Ruby
into a good replacement for Smalltalk.  And I think that from a strategic
perspective, that's probably all you really need to know.

--Alan





More information about the Squeak-dev mailing list