O'Reilly logo

Smalltalk Best Practice Patterns by Kent Beck

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Collections

The collection hierarchy is one of the great strengths of Smalltalk. Code that has to be tediously written over and over in other languages is a single word in Smalltalk. The result is more flexible, because the collections respond to much of the same protocol, so a linear list can be converted to a hash table by substituting “Set” for “OrderedCollection.”

The bad news is, the collection classes give you yet more stuff to learn so you can master Smalltalk. The good news is, no single piece of the protocol is complicated or hard to learn and the result is code that is simpler, faster, easier to maintain, and more flexible.

The very richness of the collection classes is their biggest drawback. Beginning programmers typically ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required