Path as an object in std.path

Steven Schveighoffer schveiguy at yahoo.com
Thu Jun 6 10:51:25 PDT 2013


On Thu, 06 Jun 2013 13:47:42 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> On 6/6/13 1:13 PM, Steven Schveighoffer wrote:
>>> buildNormalizedPath(s1) == buildNormalizedPath(s2);
>>>
>>> and
>>>
>>> p1 == p2;
>>
>> This can be done without allocations.
>
> Interesting. "Show me the code!"

I think Lars summed it up nicely.  It's not full working code yet, but it  
shows how one can do the path splitting and normalization lazily.

However, it should be noted that buildNormalizedPath cannot be done  
without allocations, just the full comparison.

-Steve


More information about the Digitalmars-d mailing list