Navigation:  Tutorials > Beginners Guide to Smalltalk > Classes and Methods > Methods >

Short is beautiful

Previous pageReturn to chapter overviewNext page

The first thing to note is that the method text is short. This is very often the case with Smalltalk code and you should find that, as a matter of good style, you'll end up writing a lot of rather short methods rather than a few long ones. This makes it very easy for the reader to assimilate how a method works. Also, by breaking down a program into many small chunks, it becomes more flexible. A method is more likely to be re-usable in future situations if it does not try to do too much at once. By re-using pre-written methods your programs will be smaller and easier to maintain.