[MUD-Dev] Spoofs

Bobby Martin bobbymartin at hotmail.com
Thu Sep 27 18:00:04 New Zealand Standard Time 2001


> From: Sean K <sean at hoth.ffwd.cx>

> C++ templates provide a similar feature to Smalltalk's typing but
> at compile time.  Between this and optional dynamic binding
> through virtual functions, C++ can accomplish everything that
> Smalltalk can, but it's not always as strightforward.

Hmm, I consider myself to be something of a C++ guru, and I don't
think that I buy this.  How do you make C++ emulate the
doesNotUnderstand behavior of a Smalltalk object?  In SmallTalk,
when you call a method on an object that doesn't implement that
method, it calls the doesNotUnderstand method on that object with
the actual method signature and parameters as arguments to the DNU
method.  I don't see how you could do an equivalent in C++ without
essentially writing a meta language.

Don't get me wrong; I love templates.  I think they do lots of
things that at least the vanilla SmallTalk implementations don't do
for you (like give you type safety).  I just don't think that it can
do everything SmallTalk can - it does different good things.

Bobby
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list