From: Ron Jeffries Date: 2002-01-14T05:48:10+09:00 Subject: Re: FileHandle (was: Re: Dir.entries have no home) On Sun, 13 Jan 2002 15:35:16 GMT, Massimiliano Mirra wrote: >On Sun, Jan 13, 2002 at 09:43:01PM +0900, David Alan Black wrote: >> > class FileHandle >> Doesn't "filehandle" mean (by definition or maybe just convention) an >> open stream associated with the file? > >As in ``open function returns a file handle''? Argh, you're right. >Gotta find a new name. FileAlias? FileHook? FileShadow? >FileProjectionInProgrammerSpace? (Got carried away.) Maybe it's a Filename, and maybe it has too much functionality. What would happen if instead of doing things like move, it just handled name manipulation, and could answer a File object (i.e. with open) or a Stat? If Chet and I were going forward from my original question -- and we will probably do so -- we would just pull out the duplication from our code and put it into an object. That duplication looks mostly like name and path concatentation. We would then wait until our program needed some new file-related function and see whether our new object wanted to help us with that. So we'd put stuff into it because we needed it, and that the stuff fit there better than into any other object we had (or could imagine). That's just the way we work ... but it seems to generate really clean and clear objects for us. Regards, Ronald E Jeffries http://www.XProgramming.com http://www.objectmentor.com I'm giving the best advice I have. You get to decide whether it's true for you.