Filename (was Re: [BUG] FileDirectory>>exists)

Tim Rowledge tim at sumeru.stanford.edu
Wed May 21 17:28:45 UTC 2003


> > idea would be to have a new class called Filename that represent files 
> > only. As a result, we would be able to move a lot of stuff from 
> > FileDirectory to Filename.
I pretty much agree, except that Filename should represent file _names_
only. An actual open file should be represented by some Stream object.

The problem we face is the pervasive (ab)use of strings to represent
files and directories and too many other things in almost all other
languages. People coming to Smalltalk from these pits of evil and
iniquity write code that does terrible things with Strings and then make
a FileStream named: '/foo/bar\wibble/../../.tribble' and wonder why it
doesn't work across all platforms. Designing a decent Filename class is
not a terrifically difficult thing to do (just steal inspiration from VW
for example) but getting people to adopt it is a major educational
project.

tim
-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful Latin Phrases:- Anulos qui animum ostendunt omnes gestemus! =
Let's all wear mood rings!



More information about the Squeak-dev mailing list