[squeak-dev] readFrom: vs readFromString:

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun Oct 30 16:07:48 UTC 2011


There is a huge mess in #readFrom: implementation.
Some classes will signal trailing characters as a bug, some other
won't and will simply leave the stream positioned after the valid
part.
I propose to change this behaviour uniformly:
- readFrom: aStream will never fail on trailing chars (hey, it's a
stream, it's up to sender to interpret the tail)
- readFromString: aString will always forbid trailing char (it's not a
stream, so this garbage is most probably an error and cannot be
ignored silently)

What do you think ?

Nicolas



More information about the Squeak-dev mailing list