On Tuesday, 2 July 2013 at 20:31:14 UTC, monarch_dodra wrote:
On Tuesday, 2 July 2013 at 19:46:34 UTC, TommiT wrote:
How would you feel about adding the '/' binary operator and the '/=' assignment operator for strings, wstrings and dstrings? The operators would behave the same way as they do with boost::filesystem::path objects:

There is a *massive* difference here. boost::filesystem adds the
overload for *path* objects. It doesn't add a global operator for any indiscriminate string.

As far as I can tell, Phobos already uses strings or const(char)[] to represent paths all over the place. So, I figured, we can't add a separate Path type at this point because that train has passed. Although, I don't know if that design would have been a better anyway. Division operator for strings doesn't make any sense, and I doubt there will ever be some other meaning for '/' that would make more sense than "a directory separator" for strings in the context of programming.

Reply via email to