[swift-users] Bls: Bls: module (de)-initialization

Glenn L. Austin glenn at austinsoft.com
Thu Dec 22 08:56:58 CST 2016

> On Dec 21, 2016, at 7:29 PM, Mr Bee via swift-users <swift-users at swift.org> wrote:
> Sorry for not being clear. My english isn't very good either.
> What I meant was static module linking (loading and unloading) for Swift modules. Also with initialization and deinitialization for Swift modules.
> It's alright then. I just want to make sure. I'm a Pascal/Delphi programmer and sometimes I rely on such features in my applications. As a new and considered as modern programming language, I thought Swift would provide more advance features than Pascal/Delphi does.
> Thank you.
> –Mr Bee

Many of us also depend upon dynamic linking, but the runtime for Swift (and Objective-C) is far more complex than just loading new code.

When loading code, there are things that "just happen" -- such as class extensions -- that need to be unlinked when the dynamic library is unloaded. For one thing if you had objects created while the class extension was available, those objects would have to be "re-written" to not use the class extension any more. If the extension allocated additional memory, that memory would be orphaned.

Dynamic languages are far more complex than static languages like Pascal and Delphi...

Glenn L. Austin, Computer Wizard and Race Car Driver         <><

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20161222/32092638/attachment.html>

More information about the swift-users mailing list