Thursday, August 07, 2008

More Smalltalk

Is Smalltalk the answer to Life, the Universe and Everything? It might be.

I learned how to write iterators that implement the do: method and unit testing with SUnit is going well. I can now do full TDD (test-driven development) in Smalltalk!

I do notice pauses sometimes and I wonder if that's Squeak's garbage collector kicking in.

Here are things I don't know how to do, or have a concern about:
  • Keep notes, like a notebook, in the workspace. Maybe Transcript will work like this, I thought I did that before, but that may not be the best way. I should go through a tutorial on Squeak.
  • The name space for classes isn't hierarchical (I think) like, say in Python (or Perl or Java). That's slightly annoying since you can't easily compartmentalize your class names but they are more “global.”
  • The workspace can become polluted with junk if you continually create objects (for testing and such) and don't delete them. Sort of like a Windows XP system. I think the solution is to (carefully) save all of your code into a library of some kind, make a new image and reload everything. (Again, sort of like Windows XP).
What's next:

  1. Learning Monticello! That's the package management system like Bazaar.
  2. Sharpen up on the syntax. I'm still confused about about when to use () vs. []. Well, maybe I'm not. I think the former is for grouping expressions and the latter is for statement blocks. However, if everything is an object and method (it is), then an expression sure seems like it's a statement block to me! Oh well, maybe I don't understand it.