Next in Review Queue: The New std.path

Nick Sabalausky a at a.a
Fri Jul 15 12:42:50 PDT 2011


"Vladimir Panteleev" <vladimir at thecybershadow.net> wrote in message 
news:op.vyny7zfetuzx1w at cybershadow.mshome.net...
> On Fri, 15 Jul 2011 03:20:13 +0300, dsimcha <dsimcha at yahoo.com> wrote:
>
>> Lars Kyllingstad's new and improved std.path module for Phobos is the 
>> next item up in the review queue.
>
> Three notes:
> 1. No tests for extension("foo") is null && extension("foo.") !is null

I don't know if you're talking about actual unittests or documentation, but 
that brings up a good point: The behavior of extension("foo.") should be 
clearly documented. (Unless it already is and I just overlooked it?)

> 2. absolutePath's signature could be changed to string absolutePath(string 
> path, string base = getcwd()) for more flexibility at no penalty
> 3. Would be nice to have relativePath(path, base) to complement 
> absolutePath().
>

These two are absolutely (no pun intended) fantastic ideas. On #2, you're 
totally right about "more flexibility at no penalty". And relativePath() is 
necessary for converting a path into a relocatable form, which definitely 
has its uses especially when dealing with paths that will end up being used 
on other computers.





More information about the Digitalmars-d mailing list