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

2016-12-22 Thread Glenn L. Austin via swift-users
> On Dec 21, 2016, at 7:29 PM, Mr Bee via swift-users  
> 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 <><


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


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

2016-12-21 Thread Mr Bee via swift-users
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
 

Pada Kamis, 22 Desember 2016 10:12, Joe Groff  menulis:
 

 
> On Dec 21, 2016, at 7:11 PM, Mr Bee  wrote:
> 
> > Unloading Swift modules will likely never be supported, since this would 
> > impose a ton of complexity and performance cost on the runtime for little 
> > benefit.
> 
> Hmmm… so Swift will only support static linking? I thought Swift is a modern 
> programming language with modern and advance features. Even Pascal/Delphi has 
> had those features since ages ago.

Swift supports dynamic linking just fine; like I said, "dlopen" works.

-Joe


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