<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 6 Apr 2017, at 06:56, David Hart via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; 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;" class=""><br class="Apple-interchange-newline"><br class="">On 6 Apr 2017, at 04:21, Ricardo Parada via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" style="font-family: Helvetica; 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;" class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 5, 2017, at 9:41 PM, Brent Royal-Gordon via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span class="" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">It's worth noting that, if you write `\Person.name.valueType`, this syntax is ambiguous—it could mean "make a key path for the `valueType` property on `name` property of `Person`", or it could mean "make a key path for the `name` property of `Person`, then access the key path's `valueType` property". We can solve this by always interpreting it as the former and requiring parentheses for the latter—that is, `(\Person.name).valueType`—but I thought it was worth calling out explicitly.</span><br class="Apple-interchange-newline"></div></blockquote></div><br class=""><div class="">Good point. </div><div class=""><br class=""></div><div class=""> I'm thinking about the hypothetical code examples from previous emails:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""></div></blockquote></div><div class=""><div class=""><font face="Monaco" class="" style="font-size: 12px;"> let isPuppyQualifier =<span class="Apple-converted-space"> </span><font color="#af00f4" class="">\Pet.type</font><span class="Apple-converted-space"> </span>== .dog &&<span class="Apple-converted-space"> </span><font color="#af00f4" class="">\Pet.age</font><span class="Apple-converted-space"> </span>< 12</font></div><div class=""><font face="Monaco" class="" style="font-size: 12px;"> let familyQualifier = </font><span class="" style="font-family: Monaco; font-size: 12px;">(</span><font face="Monaco" class="" style="font-size: 12px;"><font color="#af00f4" class="">\Family.pets</font></font><span class="" style="font-family: Monaco; font-size: 12px;">)</span><font face="Monaco" class="" style="font-size: 12px;">.contains(where: isPuppyQualifier)</font></div><div class=""><font face="Monaco" class="" style="font-size: 12px;"> let familiesWithPuppies = Family.fetch(editingContext, familyQualifier)</font></div></div></div></blockquote><div style="font-family: Helvetica; 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;" class=""><br class=""></div><div style="font-family: Helvetica; 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;" class="">Couldn't the compiler see there exists no contains property on pets and allow us to avoid the parentheses?</div></div></blockquote><br class=""></div><div>Probably, but IMO it actually looks better, and is clearer, with the brackets anyway, so encouraging their use could be a good thing perhaps?</div></body></html>