Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

samtregar (2699)

  (email not shown publicly)

Journal of samtregar (2699)

Friday March 21, 2003
02:07 PM

Smalltalk and late binding objects

[ #11156 ]
I've been learning Smalltalk by reading a book about Squeak. I must say I am extremely impressed. The language itself is interesting enough, but the Squeak environment is unbelievable. I've litterly never seen anything like it. If you think "visual programming" means Visual.NET and Delphi then you really should check out Squeak. And best of all, all the source is available. Everything from the VM all the way up to GUI applications is written in Smalltalk and available for browsing.

So far the most interesting idea I've encountered in Smalltalk is the focus on late binding. Most object-oriented languages have static type systems that bind at compile time. This results in very inflexible systems that don't adapt well to change. Smalltalk on the other hand is practically type-less and binds methods to objects at the last possible moment. Basically, you can send any message to any object and you only find out if it works at runtime when the object either understands the message or doesn't.

Of course, that's the same way Perl works! Seeing the way that Smalltalk exploits this property to build object systems that can be reorganized at runtime is very interesting to me. I think that if I let this stuff stew long enough I'll eventually be able to integrate it into my OO design methodology. And if that happens, watch out!


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • One of things that sets Smalltalk apart is the ability to literally debug a program into existence. You can call methods that don't yet exist, then trap into the debugger, add the method, and continue execution. The first time I saw someone working this was, my jaw hit the floor and my eyes bugged out. Though I didn't realize it at the time, they were doing test-driven development without having to stop and restart execution environment. Wow.
  • I've often said that you don't know objects until you've used a pure-object system, like Smalltalk, Eiffel, or Ruby. Hybrid systems like Java, C++, Python or Perl (sorry!) don't count.

    Squeak [] rocks. It has a heritage leading back to the original Smalltalk-80 system, being maintained by two of the guys that came from that place and era (Alan Kay and Dan Ingalls). On a 68K-class machine, you had a full interactive development environment, including a breakpoint system with full source-code symbolic debugger that lets you restart from the middle of the interrupt, having changed code at any level of the stack. Try that with Java. And as soon as you taste the "everything is an object" world, you won't want to go back.

    • Randal L. Schwartz
    • Stonehenge
  • I strongly recommend Smalltalk Best Practice Patterns by Kent Beck. Top notch stuff.