> 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.
–Mr Bee
Pada Kamis, 22 Desember 2016 1:06, Joe Groff via swift-users
<[email protected]> menulis:
> On Dec 20, 2016, at 8:54 AM, Jens Alfke via swift-users
> <[email protected]> wrote:
>
> Also, AFAIK there is no mechanism in Swift (yet) to load or unload a module
> at runtime, so a module load occurs when the program starts up, and an unload
> occurs when the program exits.
dlopen works fine, though the only supported ways of getting a callable symbol
out of the loaded image are currently to use a C entry point or look up a type
defined in the module by name. 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. (Apple's ObjC runtime does not support
unloading dylibs after classes inside them have been reified either.)
-Joe
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users