Squeak scripts in UNIX

tim Rowledge tim at rowledge.org
Fri Feb 16 16:38:07 UTC 2007


On 16-Feb-07, at 8:20 AM, Lex Spoon wrote:


>
> Why is the default directory set to the image's directory, anyway?
> That seems like zero bits of information: you can already compute it
> from the image's filename.  Additionally, isn't the most sensible
> "default directory" the same as the "default directory" (cwd) of the
> calling process?

In the general case, because it is the only directory you can be sure  
of across platforms. Not all systems have any concept of a 'current  
working directory'. And of course, the default directory name *is*  
worked out from the image name.

A faintly plausible alternative would be if the image were allowed to  
be in a different (ie read-only) directory to the changelog and the  
changelog directory were the default (since it really pretty much has  
to be read-write). Saving the image (if allowed by the settings of  
the system) would be to the known writable directory. This might be a  
scheme for some embedded devices with limited writable storage, for  
example.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange Opcodes: FART: Fill Accumulator from Result if True





More information about the Squeak-dev mailing list