From: William R. <wr...@zi...> - 2004-02-28 22:46:16
|
On Saturday 28 February 2004 19:26, Henrik Isaksson wrote: > I think it's good enough, but why do you want to remove /boot/atheos? You > have a valid path, I don't see the point in changing it... > Also, why not simply use "^/", that was suggested earlier? I tried this in > the Locale class, and it works fine... I think that works because the File class does what this new function does. So the people Rick's code would benefit are those who want to just use libc for file things (because it's not so bad, really). But this is probably not many people. [Aside to Rick: this same group of people is also unlikely to want to use C++ strings for this, I think] Like you (and others) say maybe it would be better to start app developers and users getting used to "^/" because it helps to resist the temptation to embed full paths into config files, etc, and makes apps more robust and tolerant of being moved around the place. So rather than an app working out where it is and returning a full path, it should work out where it is and present paths to the user (and itself) as "^/" + relative path. This may even be in the style guide, IIRC. There was an argument once before about whether "^/" and "~/" should just be in the kernel's open()/stat()/whatever() implementation and I think the outcome was that if people wanted to use this trick they should use the I/O classes, not libc, and if you used libc you could do the hard work yourself. cheers, will |