<div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr">On Wed, Aug 28, 2019 at 8:16 PM Ville Voutilainen <<a href="mailto:ville.voutilainen@gmail.com" target="_blank">ville.voutilainen@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 28 Aug 2019 at 07:18, Andrew Tomazos via Lib-Ext<br>
<<a href="mailto:lib-ext@lists.isocpp.org" target="_blank">lib-ext@lists.isocpp.org</a>> wrote:<br>
><br>
> I think modelling a path as a container of its components is reasonable.<br>
><br>
> 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.<br>
<br>
It's perfectly sensical for hierarchical things</blockquote><div><br></div><div>Consider:</div><div><br></div><div> struct Tree {</div><div> std::vector<Tree> children;</div><div> };</div><div><br> bool operator==(const Tree& a, const Tree& b) {</div><div> return a.children == b.children;</div><div> }<br></div><div><br></div><div>Here we have a type that is a container of itself. A hierarchy.</div><div><br></div><div>However, there is no *value* of type Tree such that:</div><div><br></div><div> *this == this->children[0]</div><div><br></div><div>I would argue hierarchy alone is not a sufficient motivation to have a self-referential model such that a *value* can be a container holding itself.</div><div><br></div><div>You would need to be modelling something that needs a cyclic directed graph - but even then we don't often think of a graph node as being a "container" of its outbound edges.</div><div><br></div></div></div>
</div>