Ingo Hohmann <ingo@2b1.de> asked about ways to represent
multiply return values and he got some interesting answers.
 
I agree with Cees that code like
 
result := foo doSomething.
(bar := result at: 1) > 0
   ifTrue: [self error: (result at: 3)]
   ifFalse: [^result at: 2]
is a candidate for easy improvements. Yes, it is of course possible to use an Array and it works, but
 
There is a related problem and I want to explain that too, because it is one of the most costly mistakes that I ever made (in Smalltalk, not in life)
 
I had a lot of cooperating classes and in the instance protocol of all these classes I had methods with identical names (I wanted to use polymorphism and that was ok). Initially these methods had a small number of parameters, but later I had repeatedly to add additional parameters. Every time I needed a new parameter, I added that new parameter to all these methods and than I updated all senders. Finally I removed all the obsoleted methods. I can only regret my foolishness, but it took me some time to understand that I failed to define a class for all my parameters. (I was even not smart enough to use an array!) Now that I have understood that, the introduction of an additional parameter is very easy. I add an instance variable and access methods to the class that keeps all the parameters and I have to rework only the methods that have to access the additional parameter.
 
Given this experience, I think now that is is not best practice to ask "Do I really need a class?". It is - in my opinion - much better to ask: "What problems will I incur when I do not define a class?"
 
By the way, I agree that the use of exception is not always a good solution. Use of exceptions becomes increasingly difficult when you have to handle additional data elements (the equivalent of adding instance variables to a class)
 
Just my 2 eurocents,
Boris