다음을 통해 공유


We Owe It All To Smalltalk

The more I learn about Smalltalk, the more I realize what a foundational language it was.  I'm not convinced it it a language that really deserves widespread use today.  Newer languages have improved upon most of its features in one way or another.  However, a lot of modern programming originated with Smalltalk.  Here's a sampling:

  • The GUI was first popularized on the Xerox Alto which, if I'm not mistaken, was programmed primarily in Smalltalk.
  • The Model-View-Controller UI design model came from Smalltalk
  • Most of our Object Oriented design ideas came from the world of Smalltalk.
  • Unit testing originated in Smalltalk with Kent Beck's Testing Framework.
  • Extreme Programming comes out of the world of Smalltalk programmers.
  • Refactoring came out of the Smalltalk community.
  • Responsibility Driven Development (like CRC cards) came out of Smalltalk too.
  • Design Patterns originated in the Smalltalk community.

Some of this is the language, a lot of it is the community.  Things like XP, Unit Testing, Refactoring, and CRC cards are all obviously community creations.  However, even some of what we usually consider language features come from the community.  In Smalltalk a huge amount of what is enforced by languages today is done through convention.  Smalltalk has objects and inheritance but there is no sense of an interface in the language.  There is no support for abstract classes.  Yet most of the design patterns originated in the world of Smalltalk.

Why is this?  I'm not certain.  At the time, all other languages (other than Simula) were procedural.  Smalltalk was the only one that was object oriented.  The world didn't really tune in to objects until at least a decade after Smalltalk took off.  It's long been said that a programming language influences the way you think.  Perhaps that is what happened.  Maybe in order to come up with extreme programming, you need to be freed from the ways of procedural language.

Why do you think all of these inventions came from this relatively small community?  I'd love to hear your thoughts.

Comments

  • Anonymous
    July 06, 2007
    OOP doesn't free you from procedural programming, it's just an abstraction on top of it. You can see that every time you write code that depends on modifying state. It was possible to do OOP in Lisp too at the time, and it's not fair to call Lisp a procedural language - it's a multi-paradigm language. Also, interfaces and abstract classes are crutches that static type systems need.  Dynamic type systems don't need that; if a method is there you can call it, otherwise you'll get a runtime error (which isn't necessarily disastrous, it won't be a segfault). In other words, you don't need to restrict your real-life button-pressing ability to objects that implement the interface HasButton, only to objects that have buttons.  The name HasButton is unnecessary.

  • Anonymous
    July 06, 2007
    The comment has been removed

  • Anonymous
    July 07, 2007
    The comment has been removed

  • Anonymous
    July 15, 2007
    @Ricky - I understand that you don't need interfaces and abstract classes, but they make things a lot easier.  Abstract classes are useful because the language will stop you from instantiating a class not intended to be instantiating.  In Smalltalk, you can create an object from an abstract class only to run into errors later.  Interfaces, while not strictly necessary, make understanding the code easier.  It's easier to see if something implements ReadStream than to memorize which of the methods need to be present to treat something as a readable stream. @Thomas - you are correct that Simula was the first OO language, but I don't think it got the popularity that Smalltalk did.  Thus I said Smalltalk popularized OO. @M Easter - Refactoring is not the same as restructing code.  Refactoring is changing the code without changing the functionality.  That may have been done in Fortran, but I think that was more likely changing the code in the process of adding a feature.  Whether it was or not, the formal recognition of the process came out of the Smalltalk community. I enjoy reading your insight into why Smalltalk had so much impact.  I think you make great points.