Wouldn't it be convenient if you could do this:

        msg := 'The number is ', number

instead of

        msg := 'The number is ', number printString

Or even this:

        msg := number, ' is the value you entered.'

instead of

        msg := number printString, ' is the value you entered.'

This would require the comma method in Collection to act differently when the argument isn't a Collection
and the Number class would need to add a comma method.

I'm pretty new at this, so maybe there are reasons this is done. Are there?

As some might guess, I'm used to the way Java automatically calls toString on things that aren't strings when one side of a concatenation is a String and the other isn't.

---
Mark Volkmann




_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to