In JavaScipt they are known as "every" and "includes".<br><br>In C# they are "TrueForAll" and "Exists".<br><br>Not sure why "all" and "contains" is any less consistent.<br><div class="gmail_quote"><div dir="ltr">On Thu, Apr 6, 2017 at 05:50 Víctor Pimentel Rodríguez via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On Thu, Apr 6, 2017 at 12:44 AM, Jonathan Hull via swift-evolution <span dir="ltr" class="gmail_msg"><<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg">On that note: ‘containsOnly' is still my favorite by a wide margin. I know it is longer than ‘all’, but it’s behavior is much clearer (especially for those of us who have never used or heard of ‘all’ in other languages), and it’s relationship with ‘contains’ is also very clear.</div></blockquote></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_extra gmail_msg">Also +1 to containsOnly for this very reason.</div><div class="gmail_extra gmail_msg"><br class="gmail_msg"></div><div class="gmail_extra gmail_msg">In other languages (Python, Ruby, etc) that have an `all` method, they also have an `any` method, thus maintaining certain consistency.</div><div class="gmail_extra gmail_msg"><br class="gmail_msg"></div><div class="gmail_extra gmail_msg">In the Swift standard library that `any` method is called `contains`, so `containsOnly` matches nicely that consistency.</div><div class="gmail_extra gmail_msg"><br class="gmail_msg"></div>-- </div><div class="gmail_extra gmail_msg">Víctor Pimentel
</div></div>
_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div>