<div><br><div class="gmail_quote"><div dir="auto">Jens Alfke &lt;<a href="mailto:jens@mooseyard.com">jens@mooseyard.com</a>&gt; schrieb am Mi. 8. Nov. 2017 um 16:54:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><br><div><br><blockquote type="cite"><div>On Nov 8, 2017, at 2:24 AM, Geordie Jay via swift-users &lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt; wrote:</div><br class="m_-8114994487788246869Apple-interchange-newline"><div><div dir="auto" style="font-family:Alegreya-Regular;font-size:15px;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">Would you be able to clarify where the line is between “tricky” and “not tricky” and if possible the reasoning behind making this distinction? Because as an outsider this seems to me like an unfortunate remnant of ObjC rather than an obvious and forward-thinking API decision.</div></div></blockquote><br></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div>The “only available after importing Foundation” thing has been around since 1.0 — it’s an artifact of the bridging of String and NSString*. After importing Foundation, the methods of NSString are implicitly available as an extension of String. I would think that by now the Swift standard library would have added those methods, but I guess not all of them…</div><div></div></div></blockquote><div dir="auto"><br></div><div dir="auto">Hi, and thanks for your response.</div><div dir="auto"><br></div><div dir="auto">I’m aware of the legacy. What I meant was I’m surprised that String.contains(anotherString) returns two different things depending whether or not Foundation is imported.</div><div dir="auto"><br></div><div dir="auto">And I was looking for some clarification re: “tricky” vs not. I gather NSString didn’t even exist in ObjC outside of Foundation. What I was getting at was whether it makes sense to stick with the status quo on this point.</div><div dir="auto"><br></div><div dir="auto">Geordie</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div>—Jens</div><div><br></div><div>* And IIRC it also manifests with Array, Dictionary, and other bridged classes.</div></div></blockquote></div></div>