|
There are some massive advantages to smalltalk's all-object approach: Metaprogramming (like MOP), becomes far easier and more useful. And while the object model is degenerate, and there is only single dispatch, It's not that bad: The above are similar to Java, and smalltalk has much better metaprogramming than Java. I think dynamic dispatch in ST wouldn't be too hard to hack in. But I haven't explored enough about ST metaprogramming to be sure. >Perhaps nothing will ever be perfect, but I feel as though Smalltalk has been surpassed at this point in time. You may well be right, but it IS one of the very few OO languages that meet Kay's definition of the term, and is said to be akin to lisp in many respects. And lisp is a language many would say the same for. But you may be right, and while much the ST family aside from ST-80 died, a few survived: namely, Self, Newspeak, and Io, all based to some degree upon ST-80. Of the three, at least one seems dead, all three are still usable and offer glimpses into what might have been. None of them have MI, though. |
That's fine. I wasn't questioning Smalltalk's all-object approach, though. Lots of languages do that now.
> And while the object model is degenerate, and there is only single dispatch, It's not that bad: The above are similar to Java, and smalltalk has much better metaprogramming than Java.
"It's better than Java" is hardly a consolation :p
> I think dynamic dispatch in ST wouldn't be too hard to hack in. But I haven't explored enough about ST metaprogramming to be sure.
From what I could tell when I looked into it, the standard solution is to use the Visitor pattern, as you would in Java or C++. That leaves me pretty wanting, to say the least, and anything beyond double dispatch via Visitor is too tedious and spaghetti-like to be worth it at all.
> You may well be right, but it IS one of the very few OO languages that meet Kay's definition of the term, and is said to be akin to lisp in many respects.
That's because Lisp was one of Kay's inspirations for Smalltalk. It's not unique to Smalltalk, either, and it wasn't unique to Smalltalk even when it was conceived -- tons of languages are "akin to Lisp in many respects" nowadays. Doesn't make them Lisp, though :p
> And lisp is a language many would say the same for.
Sure, you can implement Smalltalk-style message-passing semantics in Lisp (it's how Scheme was born, after all), but I find CLOS-style generic-function-application semantics to be far more powerful and expressive. Not only do you get multiple dispatch and multiple inheritance, but the separation of methods from objects means that the methods themselves (the generic functions, technically) are first-class objects and can be passed to and returned from other functions, stored in data structures, etc. The separation also leads to a nice solution to what I call the "Expression Problem for Untyped Languages", which is a weaker form of the Expression Problem, differing only in that it relaxes the requirement for static type safety.
Anyway, what I'm trying to get at here is twofold: 1) CLOS > ST; 2) I wonder how Alan Kay feels about CLOS-style OOP, given that objects no longer behave as actors sending and receiving messages (though, I guess if you squint a little, you can view multiple dispatch as sending a message to a group of actors, such that they work in parallel to accomplish some task and produce a response; and, of course, you can still write singly-dispatched methods in CLOS, too).
> But you may be right, and while much the ST family aside from ST-80 died, a few survived: namely, Self, Newspeak, and Io, all based to some degree upon ST-80. Of the three, at least one seems dead, all three are still usable and offer glimpses into what might have been.
Eh, I'm okay with the way things turned out :p