New SqueakMap
Yoshiki Ohshima
yoshiki at squeakland.org
Fri Apr 7 19:07:12 UTC 2006
Göran,
> The decision to let default filestreams to be #ascii instead of #binary
> - what are the arguments for that?
> I mean, to me "the least surprising thing" would have been binary
> instead of a default conversion. So in the same vein as CrLfFileStream
> it could have been binary until explicitly asked to make conversions.
>
> But perhaps I am in minority in this "default expectation".
One thing to be clarified is that a binary stream takes ByteArrays,
not Strings; #binary doesn't only mean non-conversions.
So the question probably was about non-conversions vs conversions.
For a first time Squeaker, they would want to write out a string and
read it back from a file (they wouldn't know the difference of
ByteString and WideString, or even the line end problem). Otherwise,
there will be strings that *cannot* write out to a file. For such
user, putting UTF-8 conversion (no matter what platform he is on) by
default would help.
(Year, along this line, there can still be an argument that the
line-end-conversion should match the platform one. But still I would
say keep it Squeak native would cause less confusion.)
For somebody more than a novice, the user should set up things as he
wants. I could say that this follows "Keep simple things simple, and
make complex things possible."^^;
-- Yoshiki
More information about the Squeak-dev
mailing list
|