carbon-lang icon indicating copy to clipboard operation
carbon-lang copied to clipboard

Exporting imported names

Open jonmeow opened this issue 1 year ago • 3 comments

In order to support exporting imported names, add export import library <library> and export <name reference> syntax.

jonmeow avatar May 06 '24 22:05 jonmeow

Note, not sure what the best way is to see if people agree on the syntax choice -- I was thinking if there's a preference for an alternative, I can adjust the proposal. But export import at least sounded like people though it'd be okay, in the discussion.

jonmeow avatar May 06 '24 23:05 jonmeow

@zygoloid FYI I want to be sure you notice the namespace commit. I don't think it really changes the proposal, but it I was trying to close some design gaps I realized existed (naively, export NS; would only export the namespace itself, not contents). [also, export OtherPackage.Name; wasn't explicitly disallowed, and is now]

jonmeow avatar May 07 '24 16:05 jonmeow

Still LG with namespace changes. I agree that disallowing namespace exports for now is the right choice, consistent with the existing rule that namespaces are exported iff they contain anything exported.

zygoloid avatar May 07 '24 23:05 zygoloid

And merging (confirmed with the author).

chandlerc avatar May 16 '24 23:05 chandlerc