Tuesday, February 13, 2007

Squeak Tidbits

What with relocating to LA, I've been lagging on blog posts recently. I discovered a couple things that I haven't yet had time to fully investigate, but they're both interesting.

The first is Magma, an open-source object-oriented database. I got a great e-mail about object-oriented DBs from Thierry Thelliez which I'm hoping to post/summarize here; although you don't hear about people using them much in "real life" they do in fact appear to have pretty significant advantages. Chris Muller, Magma's creator, did a podcast interview on OODBs in general and Magma in particular, and apparently Magma is very "ready for prime time."

The second recent discovery is Traits, a new feature in Squeak 3.9 which is kind of like Ruby mixins, but with a cleaner inheritance mechanism (if I understand correctly). I haven't been able to play with these yet, but if you google "Squeak Traits" you'll find all kinds of interesting stuff, including something in the AspectJ community. Apparently the idea's proven very popular.


  1. Traits will be in:
    - Perl 6
    - Fortress<
    There is an experimental Traits compiler for C# but Microsoft doesn't seem to be interested.

    For more information on Traits see:

    At the moment there is very little software written that uses Traits but they would be a perfect fit for the Seaside canvas rendering API.

  2. Ramon Leon from On Smalltalk told me Traits were like Ruby mixins without the complexities of the inheritance tree. I still have a bit of research to do there, haven't figured them out yet.

  3. Yes, the semantics are the same as if the methods of the Trait were defined in your class (this is called the flattening property) (in fact the methods get added to your class). If you already have methods with the same name in your class, they take precedence. That already was it.

    Aliasing changes only the name of the method and not the super send, if it has one (Traits with super sends are not so cool, they assume much about your class hierarchy).

    You can think of Traits as Java interfaces that can contain methods that are implemented with other methods in the same interface.


Note: Only a member of this blog may post a comment.