[swift-evolution] [Draft] scope-based submodules
Vladimir.S
svabox at gmail.com
Fri Feb 24 15:56:34 CST 2017
Matthew, thank you for sharing this great text!
Unfortunately was not able to read it in details yet, but after looking for
proposed solution, have a quick question.
You are proposing to have 'submodule' keyword in each file of that
submodule. How can we then solve such issue: imagine that I have swift file
with some code in it. I got this file from external
source(repository/site), I will periodically update it with newer version
for example. I want to use this file in my two submodules, but don't want
to 'share' or 'make visible' types/classes/funcs etc from this file with
other code outside of these submodules.
As I understand, with your suggestion the only way is have two copies of
that file and append 'submodule' keyword in each. Or I understand the whole
idea incorrectly? (Sorry then)
On 24.02.2017 22:34, Matthew Johnson via swift-evolution wrote:
> I didn't expect submodules to be a part of the Swift 4 discussion. When it
> came up I was pleasantly surprised. I have been thinking about the design
> of a submodule system for quite a while but was planning to wait until it
> was clearly in scope to draft a proposal. Now that the topic has been
> introduced I decide to write down the design I've been thinking about,
> along with the motivation and goals that underly it. I understand
> submodules may not be in scope for Swift 4 but wanted to contribute this
> design while the discussion is fresh in everyone's mind.
>
> I am including the contents of the proposal below. You can also find it on
> Github: https://github.com/anandabits/swift-evolution/blob/scope-based-submodules/proposals/NNNN-scope-based-submodules.md
>
> I am very much looking forward to everyone's feedback!
>.....
More information about the swift-evolution
mailing list