<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="">Right. &nbsp;When I say “statically link” here, I really mean “put the .dylib for the library into the app bundle”. &nbsp;That’s what happens with Swift today. &nbsp;It can be important to share that code between apps and appex’s for example.<div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 10, 2018, at 5:02 PM, Wallacy &lt;<a href="mailto:wallacyf@gmail.com" class="">wallacyf@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div dir="auto" class="">If I understand this correctly. This is exactly the same argument in favor to maintain the ABI unstable and always bundle the standard library and the runtime with the app.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Another alternative is, not only, separate the standard library on small pieces, but also dynamic link this specific version of this piece and keep all versions on the SO. (I think the Microsoft did something similar to this)</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">On Linux the package manager probably will handle this very well like any other library.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Even 100 versions in the same SO will not consume enough space to bother anyone.</div><div dir="auto" class=""><br class=""></div><br class=""><div class="gmail_quote"><div class="">Em qua, 10 de jan de 2018 às 17:04, Hooman Mehr via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; escreveu:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Excellent Idea!<br class="">
<br class="">
I am all for this. It shouldn’t be too complicated to add a second implicit import and only code that is actually using this stuff will have increased code size.<br class="">
<br class="">
&gt; On Jan 9, 2018, at 10:29 PM, Chris Lattner via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:<br class="">
&gt;<br class="">
&gt; Disclaimer: I’m reordering your comments below to suit my nefarious purposes: :-)<br class="">
&gt;<br class="">
&gt; On Jan 9, 2018, at 3:48 PM, Ben Cohen &lt;<a href="mailto:ben_cohen@apple.com" target="_blank" class="">ben_cohen@apple.com</a>&gt; wrote:<br class="">
&gt;&gt;&gt; More to the point though, this seems like an implementation detail of Mirrors.&nbsp; What is the plan for Mirrors + ABI stability?<br class="">
&gt;&gt;&gt;<br class="">
&gt;&gt;<br class="">
&gt;&gt; Absent a proposal to change them to something better (and I’m not aware of one pending), the plan is they are what they are, at least the public API of Swift.Mirror. I would guess this whole area is a candidate to be overhauled significantly at some point in the post-Swift 5 future with some more fully-fledged reflection system, but there is little chance of this happening before ABI stability, and interim tinkering doesn’t seem worthwhile to me.<br class="">
&gt;<br class="">
&gt; Ok, I understand that (among all the other things going on that are clearly more important) revamping this is probably not the highest priority thing to do.&nbsp; That said, it would be really unfortunate to carry around these “suboptimal” APIs forever, particularly given how marginal they are (as in, not widely used).&nbsp; I’m sure that there are other examples beyond these that are similarly unfortunate.<br class="">
&gt;<br class="">
&gt; Given that, I have a meta question for you: have you considered an approach where you take the Swift standard library and split it into two conceptual pieces:<br class="">
&gt;<br class="">
&gt; 1) The "ABI stable” subset of the library that gets burned into the OS.<br class="">
&gt; 2) The “ABI unstable” subset, which gets statically linked into apps, just like the Swift 4 library used to?<br class="">
&gt;<br class="">
&gt; Given that “import Swift” is implicit anyway, you could just have the compiler implicitly import *both* of these modules.<br class="">
&gt;<br class="">
&gt;<br class="">
&gt; The point of doing this is that it gives you a very general and low friction way to handle compatibility gunk.&nbsp; In addition to putting obscure stuff like Mirror and “DictionaryLiteral” into this (without breaking source code!) you now get the ability to put the various deprecated forwarding functions in this module as well, avoiding them becoming part of the ABI.<br class="">
&gt;<br class="">
&gt; The nice thing about this is that only people who use these things would have to pay the cost, and you can directly message this by deprecating all the stuff in it.&nbsp; Think about it as an overlay for the Swift standard library :-)<br class="">
&gt;<br class="">
&gt;&gt;&gt; +1 for renaming it to something that isn’t super confusing, but +100 for removing it outright.<br class="">
&gt;&gt;&gt;<br class="">
&gt;&gt;&gt; Rationale: if we didn’t have this functionality in the stdlib today, we would not consider adding it.&nbsp; It doesn’t meet the bar we’ve set for what is in the standard library.&nbsp; It only exists there by historical accident.&nbsp; The Mirror API was not carefully considered.<br class="">
&gt;&gt;&gt;<br class="">
&gt;&gt;<br class="">
&gt;&gt; Personally, I feel like this argument for removal as past its use-by date. It was a good reason for Swift 3, tenuous for 4 and should be ruled out for 5, since the source stability bar has been raised since. Like I said, IMO the criteria should now be “active harm”. I also don’t think searches of GitHub etc are sufficient justification, except when combined with the active-harm argument. I also don’t think the origin story of the type – whether accidental or intentional – is relevant to the decision of what to do with it now. It exists and people can legitimately use it for their own purposes independent of mirrors.<br class="">
&gt;<br class="">
&gt; I’m generally in agreement with you, but in this specific case, I seriously doubt people are using this.&nbsp; All rules are malleable in the right circumstances.<br class="">
&gt;<br class="">
&gt; More importantly though, if we had a meta design that allowed to gracefully phase this sort of thing out (without it becoming part of ABI under any name) there becomes very little cost to leaving it around in the “abi unstable” library for…. ever if need be.&nbsp; Given that, I would have much less objection to keeping it around.<br class="">
&gt;<br class="">
&gt; -Chris<br class="">
&gt;<br class="">
&gt; _______________________________________________<br class="">
&gt; swift-evolution mailing list<br class="">
&gt; <a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
<br class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></div></body></html>