[swift-users] Importing Empty C Structs
jordan_rose at apple.com
Mon Feb 15 12:28:00 CST 2016
> On Feb 15, 2016, at 10:16, Joe Groff <jgroff at apple.com> wrote:
>> On Feb 15, 2016, at 10:05 AM, Jordan Rose via swift-users <swift-users at swift.org> wrote:
>> The main reason we don't do this today is that in the REPL you might import the definition later, and then you can't update the existing type. We definitely need a better story here, though.
> This could also potentially happen in a standalone executable image, which might have been compiled with the opaque declaration and then dlopen a dylib with the full definition. We'd want Swift's runtime metadata for the C type to converge on the full definition when it's available.
Or consider them unique but distinct types that require an explicit conversion (a Worse Is Better answer if we can't come up with a full answer).
More information about the swift-users