<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">The last example is more appropriate as a named subscript.<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class="">tracks[mediaType: .WaxCylinder, pianist: <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"Brahms"</span>]</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 3, 2016, at 5:34 PM, Dave Abrahams via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">on Wed Feb 03 2016, Matt Whiteside &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class=""><blockquote type="cite" class="">I have one comment (below) about this part:<br class=""><br class=""><blockquote type="cite" class="">On Feb 2, 2016, at 18:59, Paul Cantrell via swift-evolution<br class="">&lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class="">I have reservations about this. It doesn’t generalize perfectly well:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>a.tracksHavingMediaType("Wax Cylinder”, andPianist: “Brahms”)<br class=""><br class="">…strikes me as awkward compared to one of these:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>a.tracksHaving(mediaType: "Wax Cylinder”, pianist: “Brahms”)<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>// or <br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>a.tracksMatchingCriteria(mediaType: "Wax Cylinder”, pianist: “Brahms”)<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>// or even<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>a.tracks(mediaType: "Wax Cylinder”, pianist: “Brahms”)<br class=""><br class="">…especially since, in a method of that form, _all_ the arguments are<br class="">likely to have a default value of nil:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>a.tracks(mediaType: "Wax Cylinder”)<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>a.tracks(pianist: “Brahms”)<br class=""></blockquote><br class="">I prefer the original:<br class=""><br class="">a.tracksHavingMediaType("Wax Cylinder", andPianist: "Brahms”)<br class=""><br class="">to any of these,<br class=""><br class="">a.tracksHaving(mediaType: "Wax Cylinder", pianist: "Brahms")<br class="">// or<br class="">a.tracksMatchingCriteria(mediaType: "Wax Cylinder", pianist: "Brahms")<br class="">// or even<br class="">a.tracks(mediaType: "Wax Cylinder", pianist: "Brahms”)<br class=""><br class="">Because to me, the 3 alternatives, especially the last one, all read<br class="">more like hashmap accesses than method calls. &nbsp;In other words, they<br class="">make it appear as if you are passing in arbitrary keys to be queried,<br class="">rather than calling one specific method.<br class=""></blockquote><br class="">I *think* I understand what you like and why you like it, but I can't<br class="">say I understand your rationale. &nbsp;To test my understanding, what do you<br class="">think of this:<br class=""><br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a.tracksHaving(mediaType: "Wax Cylinder", andPianist: "Brahms")<br class=""><br class="">?<br class=""><br class="">Thanks,<br class=""><br class="">-- <br class="">-Dave<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>