<div dir="ltr"><div dir="ltr">Am Mi., 1. Jan. 2020 um 20:44 Uhr schrieb Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>>:</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"><div dir="ltr"><div class="gmail_quote"><div><div>Yes, indeed, this is a slight shift of semantics.</div></div></div></div></blockquote><div><br></div><div>One could also call it not implementing the interface properly or breaking the contract ;-)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>But RunArray are essentially unused (just to store Text attributes).<br></div><div>They make sense only for optimization.</div><div>So they can have their own semantic, bended to their own purpose.<br></div></div></div></blockquote><div><br></div><div>Disregarding interfaces and contracts, yes. But it may surprise someone in the future.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><div></div><div>It's just that we need to comment a bit more those methods.<br></div></div></div></div></blockquote><div><br></div><div>I brought this up during a naming discussion in VMMaker some time ago: some people don't read the documentation and just rely on their expectations. It might be foolish to do so, but expectations can be justified and allow you to work more efficiently. I wouldn't like to re-check the implementation of #collect: for every new Collection subclass that comes along, in particular if I don't want to look it its implementation.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><div></div><div>If we don't want this behavior, then we probably don't want to use a RunArray</div></div></div></div></blockquote><div><br></div><div>Sometimes you don't know what kind of collection you get to #collect: from.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>Introducing a different selector would mean implementing it in other collection too.</div></div></div></blockquote><div><br></div><div>

Not necessarily. Set also does not understand #before:, you must use a SequenceableCollection if you want it. Conversely if you knowingly use a RunArray (as in Text) and you want to exploit the optimization for the iteration blocks, you could use the new selector(s).</div></div></div>