<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On 24 Jun 2016, at 23:38, William Jon Shipley &lt;<a href="mailto:wjs@delicious-monster.com" class="">wjs@delicious-monster.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 24, 2016, at 3:00 PM, Haravikk via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><div class=""><div class="" style="font-family: HelveticaNeue; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="Apple-tab-span" style="white-space: pre;">        </span>&nbsp;<span class="" style="color: rgb(187, 44, 162);">for</span>&nbsp;colinearSegment&nbsp;<span class="" style="color: rgb(187, 44, 162);">in</span>&nbsp;remainingSegments&nbsp;<span class="" style="color: rgb(187, 44, 162);">where</span>&nbsp;colinearS<span class="" style="color: rgb(49, 89, 93);"><span class="" style="">egment.angle.isEssentially</span></span>(angle: segment.<span class="" style="color: rgb(79, 129, 135);">angle</span>) { // Is parameter name even necessary?</div></div></blockquote></div><br class=""><div class="">My terminology sucks because I don’t remember math terms but basically I’m trying to distinguish between angles of rays (0..&lt;360º) and angles of lines (0..&lt;180º). Because, like, if you have a line at 45º and another at 225º, well, they’re either collinear or parallel.</div><div class=""><br class=""></div><div class="">So I call the variants “rayAngle:” and “infiniteLineAngle:”. Not my finest hour.</div></div></div></blockquote><br class=""></div><div>Sorry, I think I got a bit side-tracked, didn't mean to seem too critical of the name choice, my point was that the logic is actually pretty straightforward, and the line is long because of the verbose naming rather than the presence of a where clause (which could also be moved to another line as another option). As always you should use whatever names help you to understand and remember the intent of the code best, meanwhile I should actually focus on what my point was supposed to be =D</div><div><br class=""></div><div><br class=""></div><div>So yeah, I don't think any of the examples presented have had "too much logic" for a where clause, while more complex cases with ands, ors, etc. might become a bit less immediately readable, it's no more so than any other if-condition, and it's an issue of personal style choice regardless, rather than a fault with a where clause.</div></body></html>