On Monday, July 30, 2012 05:15:51 Andrej Mitrovic wrote: > But I haven't seen any libraries > which use tokenization for paths.. maybe some exist out there..
Boost. And I think that Java has a library that does (maybe its standard library - if not is probably an Apache library). I don't recall for certain though, since it's been a while since I used Java. So, yes they exist, but all of the system calls use strings, so it all has to be converted to strings eventually, and using a Path object which uses tokenization and whatnot also complicates things from the perspective of the user, so it's not necessarily a win. If the issue is that the implementation is more difficult, well, write unit tests and whatnot to make sure you got it right. From the user's perspective, it's the usability and efficiency which is paramount; the complexity of the implemenation is irrelevant as long as it's right. In any case, whatever the pros and cons are of a path object rather than strings, it was discussed for Phobos at one point and decided that it just wasn't worth it. - Jonathan M Davis