On Friday, August 12, 2011 10:14:11 Rainer Schuetze wrote: > I like how std.path has turned out. Thanks, Lars. > > Two minor issues while skipping through the source (I've been on > vacation, and it took some time to catch up, so I'm not sure these have > already been discussed): > > - C[] baseName(C, C1)(C[] path, C1[] suffix) does not respect the case > sensitivity of the OS with respect to suffix, I think it should. > > - string absolutePath(string path, string base) returns an empty string > if path is empty. I would have expected that the base directory is > returned, so that you'll always get a sensible path.
Except, you gave it an invalid path if you gave it an empty string. Such a bug would be found faster if you get an invalid path back than if you get the base directory. I definitely think that if you give an invalid path to a function, it's better to get an invalid path back out. Otherwise, it's just hiding bugs, making them hard to catch and debug. - Jonathan M Davis
