Path: utzoo!mnetor!uunet!husc6!sri-unix!quintus!pds From: pds@quintus.UUCP (Peter Schachte) Newsgroups: comp.sys.amiga Subject: Re: The 1001 Paths Message-ID: <781@sandino.quintus.UUCP> Date: 16 Mar 88 22:24:08 GMT Organization: Quintus Computer Systems, Mountain View, CA Lines: 39 > Seems to me like the "set" command is the ideal way to deal with the idea > of multiple possible paths to any particular file. Manx supplies one with > their compiler, and ARP contains a (much, much smaller) freely redistributable > set command which is compatible with the Manx format. > set FONTS=fonts:!fontdisk1:fonts/!wb:fonts/!dpaint:fonts/ There are two problems with this approach, relative to having path assigns like this: assign FONTS fonts:, fontdisk1:fonts, wb:fonts, dpaint:fonts Firstly, using "set" means that only the programmer has the power to create a path. The PROGRAMMER can say he will search $FONTS for the desired font. But the USER cannot say, for example, that a compiler should look for includes in $INCLUDE, or that shell scripts are kept in $S. And an existing program that looks in FONTS: and doesn't know about $FONTS won't search my font path. We have a nice existing mechanism for specifying "virtual directories." We can extend it to cover paths, too, and this would solve the path problem in an upward-compatible way. Thus ANY filename could be a path specification. There's lots of power there! Much more than only allowing programmers to decide when paths will be searched! Of course, if you have a syntax for file names that includes expanding path variables, and any attempt to open a file will respect the path, then this complaint goes away. Is that what you're suggesting? > and write a little parse routine to search all locations for any given file. And this is my second complaint about this approach. Why should every program have to know about paths? By hiding this mess in open(), we simplify every program that wants to handle paths, and give paths for free to every program that doesn't want to bother with them. -- -Peter Schachte pds@quintus.uucp ...!sun!quintus!pds