In regards to Mac and iOS apps, the dylibs are included because of the lack of 
ABI stability, which was a goal for Swift 3 that was pushed back due to the 
really significant changes that occurred in the language.

>From what I understand, these dylibs are very light and simply act as binding 
>between the actual frameworks and your code, rather than being their own code. 
>Thus, I expect they’re as heavily optimised as they can be, and are relatively 
>light impact. They were more discussing true frameworks and libraries.

I don’t have any official evidence of this and it’d be something I’d love to 
get an official comment on too, but this would be my understanding. Also, if 
they were a significant hit I would have expected them to mention it while they 
were throwing around their pro-Swift recommendations, as a caveat.


> On 18 Jun 2016, at 8:41 AM, David Beck via swift-users 
> <swift-users@swift.org> wrote:
> 
> In session 406: optimizing app startup time at WWDC, most of the 
> recommendations were very pro Swift. Things like using structs and the fact 
> that it can automatically inline calls. One recommendation that was very anti 
> swift, was the section on limiting dylibs. The presenter recommended keeping 
> it to under 6. I’m not sure if the 15 libswift dylibs that get included by 
> default in a Swift application count towards that (he did mention that Apple 
> frameworks are optimized, but I’m not sure if that is limited to the ones 
> preinstalled on the device).
> 
> His recommendation was to use static libraries, which makes sense, except 
> that Swift on iOS doesn’t seem to support static linking. But for whatever 
> reason, Swift PM ONLY supports static linking. Is there any plans to add 
> static linking to Mac and iOS apps? The only alternative I see at this point 
> is to simply include the source files from libraries in the app’s target, but 
> Swift has from the beginning encouraged naming things generically and relying 
> on modules for name spacing.
> 
> David Beck
> http://davidbeck.co <http://davidbeck.co/>
> http://twitter.com/davbeck <http://twitter.com/davbeck>
> http://facebook.com/davbeck <http://facebook.com/davbeck>
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to