New SqueakMap

Martin Wirblat sql.mawi at t-link.de
Wed Apr 12 21:48:06 UTC 2006


Yoshiki Ohshima wrote:

> 
>   I should've phrased differently.  "For a novice Squeak programmer
> who is trying to deal with files first time" is closer what I meant.
> 
>   Yes, when we talk about the "least surprise principle", we always
> have to be careful about "whose surprise?" question.  What would you
> suggest?
> 

That  FileStream oldFileNamed: 'xyz.gif'  assumes that xyz.gif is a text 
file of UFT-8 format looks to me like the principle of the biggest 
surprise ;)

I think you can't help the programmer who doesn't know crlf and text 
format problems with this rigid default much, because UTF-8 is a 
relatively uncommon text format and there are many other file operations 
than writing out strings and reading them back. Very soon and in any 
case the novice will find out that something strange is going on there...

Regards,
Martin



More information about the Squeak-dev mailing list