[phobos] next release (meaning of path)

Andrei Alexandrescu andrei at erdani.com
Mon Jan 3 07:31:46 PST 2011


On 1/3/11 8:02 AM, Steve Schveighoffer wrote:
> I understand this, but it's rarely needed.  What would the string represent if
> not a path?  My point was that, the most intuitive interface is to take a
> string.  This looks very intuitive to me:
>
> auto f = openFile("/my/filename");
>
> So likely one would have to support both overloads with one always forwarding to
> the other.  I could be wrong, maybe it's really important to have a path type,
> but my experience with Path types are that they just get in the way most of the
> time.

I agree. Again, I've reopened this question in hope for a decisive 
argument in favor of Path.

> I typically always use / because it mostly works on all OSes.  But in any case,
> I was thinking of a function like this to convert back to a path string:
>
> string toPath(const(char)[][] elements...);
>
> auto pathstr = toPath("a", "b", "c");

Like http://www.digitalmars.com/d/2.0/phobos/std_path.html#join? :o)


Andrei


More information about the phobos mailing list