I think modelling a path as a container of its components is reasonable.

What isn't reasonable is that those components are themselves paths, as this would imply that the value of a single-component path P is a container of one item, and that one item contained in P has the value P.  A container shouldn't be able to contain itself.  It's nonsensical.

I think what I'm saying is that filesystem paths and filesystem path components should obviously be distinct types.


On Wed, Aug 28, 2019 at 2:53 AM Tom Honermann via Lib-Ext <lib-ext@lists.isocpp.org> wrote:
On 8/27/19 11:26 AM, Arthur O'Dwyer wrote:

Any user is surprised (the first time) when "/usr/local" turns out to be a 'container' holding the meaningless fragments "/", "usr", and "local".

I wasn't.

Tom.

_______________________________________________
Lib-Ext mailing list
Lib-Ext@lists.isocpp.org
Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/lib-ext
Link to this post: http://lists.isocpp.org/lib-ext/2019/08/12481.php