[phobos] next release (meaning of path)

Andrei Alexandrescu andrei at erdani.com
Sun Jan 2 17:46:02 PST 2011


Agreed. So that doesn't count as an argument for a Path type.

Andrei

On 1/2/11 7:33 PM, Jonathan M Davis wrote:
> On Sunday 02 January 2011 16:18:20 Michel Fortin wrote:
>> Le 2011-01-02 à 19:01, Andrei Alexandrescu a écrit :
>>> Let's have a brief vote. Do you think we should have a string-like
>>> structure Path in std.path? What primitives should it have?
>>>
>>> I'm fine using strings, but I could be convinced to use a Path type if it
>>> had some compelling advantages.
>>
>> I don't mind much having paths as strings, except for one thing:
>>
>> What I dislike currently is that std.path always implement the OS
>> filesystem path syntax. In some code dealing with the web I had to
>> implement my own path functions to deal with URL paths (using std.path
>> would break on Windows). So having distinct types to deal with different
>> kinds of paths would probably be helpful.
>>
>> That said, perhaps handling of URIs doesn't belong in std.path...
>
> URIs are their own beast, I think. They have their own rules about what is and
> isn't allowed in them and what separators they use. Also, the fact that you can
> have arguments in them and the like makes them distinctly different from file
> system paths. Even though there is definitely some overlap, what exactly you're
> trying to do with them and how you use them is definitely different. That being
> said, it would probably good to have some decent URI stuff in Phobos at some
> point. Having some HTTP stuff would be good too. In any case, I wouldn't consider
> it to be a good idea to mix file system paths and URIs.
>
> - Jonathan M Davis
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list