
... I would say that most of #ifdefs inside path.cpp exist to handle root
At 03:01 AM 9/6/2004, Vladimir Prus wrote: path
on Windows. The path is stored as a string and there are many instances of code which looks at first characters to determine if there <letter> ':' '/' pattern. I think if path explicitly store
- a bool telling if path has a root - the length of the root
all this logic would be much simplified.
That may be true, but it adds runtime cost. The benefit of somewhat simplified implementation code doesn't seem worth the cost. The current implementation code isn't all that bad. It has not been a source of bugs or other problems that would indicate it needs replacing. Even if it did need replacing, that could be done by refactoring without adding runtime costs. Am I missing something? --Beman