<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 22:33, Erica Sadun via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><div class="">most of these read as if there is too much logic stuffed into a single line:</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class=""><span class="" style="color: rgb(187, 44, 162);">for</span> otherWall: <span class="" style="color: rgb(79, 129, 135);">Wall</span> <span class="" style="color: rgb(187, 44, 162);">in</span> <span class="" style="color: rgb(187, 44, 162);">self</span> <span class="" style="color: rgb(187, 44, 162);">where</span> otherWall != wall && !removedWalls.<span class="" style="color: rgb(61, 29, 129);">contains</span>(otherWall) {</div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class=""><br class=""></div></blockquote><div class=""><span class=""><div style="margin:0px;line-height:normal" class=""> <span class="" style="color: rgb(187, 44, 162);">for</span> otherPieceOfFurnitureNode <span class="" style="color: rgb(187, 44, 162);">in</span> localFurnitureModelUUIDsToInterfaceElements!.<span class="" style="color: rgb(112, 61, 170);">values</span> <span class="" style="color: rgb(187, 44, 162);">where</span> otherPieceOfFurnitureNode !== pieceOfFurnitureNode {</div></span></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class=""><span class=""><div class=""><br class=""></div></span></div></blockquote><div class=""><span class=""><div class=""><span class=""> <span style="color:#bb2ca2" class="">for</span> lineSegmentObject <span style="color:#bb2ca2" class="">in</span> wallRelatedLineSegments <span style="color:#bb2ca2" class="">where</span> remainingLineSegments.<span style="color:#3d1d81" class="">contains</span>(lineSegmentObject) {</span></div></span></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class=""><span class=""><div class=""><br class=""></div></span></div></blockquote><div class=""><span class=""><div class=""><span class=""> <span style="color:#bb2ca2" class="">for</span> colinearLineSegmentObject <span style="color:#bb2ca2" class="">in</span> remainingLineSegments <span style="color:#bb2ca2" class="">where</span> colinearLineSegmentObject.<span style="color:#4f8187" class="">angle</span>.<span style="color:#31595d" class="">isEssentially</span>(infiniteLineAngle: lineSegmentObject.<span style="color:#4f8187" class="">angle</span>) {</span></div></span></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class=""><span class=""><div class="">…</div></span></div></blockquote></div></blockquote></div></div></div></blockquote></div></div></div></blockquote></div><br class=""><div class="">Personally the logic seems pretty simple to me (especially the second and third one, plus the fourth isn't actually complex), I'd say the biggest problem to readability here is that the names seem too verbose, though without seeing the rest of the code that's hard to judge. For example the last example doesn't look so bad if you shorten the names like so:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span> <span class="" style="color: rgb(187, 44, 162);">for</span> colinearSegment <span class="" style="color: rgb(187, 44, 162);">in</span> remainingSegments <span class="" style="color: rgb(187, 44, 162);">where</span> colinearS<span class="" style="color: rgb(49, 89, 93);"><span style="color: rgb(0, 0, 0);" class="">egment.angle.isEssentially</span></span>(angle: segment.<span class="" style="color: rgb(79, 129, 135);">angle</span>) { // Is parameter name even necessary?</div><div class=""><br class=""></div><div class="">Basically on the basis that it's probably obvious from context that this is to do with lines that this is to do with lines, not sure if .isEssentially()'s parameter name can be changed, but I'm not sure why there needs to be a distinction that the angle is for an infinite line (an angle is an angle).</div></body></html>