Hi Francisco -
The reason I call this overkill is that the problem we've been talking about (Number readFrom: '' readStream) can *literally* be addressed with a one-line fix, like here:
aStream atEnd ifTrue:[^self error: 'At least one digit expected'].
If you need a whole class to do that, I call this overkill ;-)
Cheers, - Andreas
francisco.j.garau@jpmorgan.com wrote:
Andreas,
I completely agree with what you said except for the first sentence. Why do you think it is a "complete and utter overkill"? I can think of three possibilities:
- The extra class you are adding to the image (SqNumberParser)
- The extra object involved in the parsing
- All the explicit methods that you have to define on the SqNumberParser
object.
None of them seems an overkill to me. I am obviously missing something.
Cheers, Francisco
This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates.