[swift-evolution] Beef up Imports
Kevin Ballard
kevin at sb.org
Wed Dec 30 15:53:19 CST 2015
Clang modules have always supported submodules, and in fact when you
import an Obj-C framework (that doesn't use a completely custom
module.modulemap), each header from the framework is automatically a
submodule (and importing the framework automatically imports all the
submodules).
All Swift is missing is a way to express a submodule hierarchy in Swift
code. It already supports the idea of importing submodules, just not
declaring them.
-Kevin
On Tue, Dec 29, 2015, at 12:29 PM, Developer via swift-evolution wrote:
> How is this done for things like the Darwin module?
>
> ~Robert Widmann
>
> 2015/12/28 20:19、T.J. Usiyan via swift-evolution <swift-
> evolution at swift.org> のメッセージ:
>> +1 in general.
>>
>> As an aside (In response to David), I have wanted the ability to
>> import 'submodules' from a framework since Swift 1.0. Being able to
>> group related functionality to import is a desirable feature, IMO TJ
>>
>> On Mon, Dec 28, 2015 at 7:01 PM, David Waite via swift-evolution <swift-
>> evolution at swift.org> wrote:
>>>
>>>
>>>> On Dec 28, 2015, at 5:07 PM, Chris Lattner via swift-evolution <swift-
>>>> evolution at swift.org> wrote:
>>>>
>>>> +1 for this general direction, if not this specific syntax. It
>>>> would also be great to have import integrate with SPM so you can
>>>> import a package from an SCM URL. This would be pretty handy in
>>>> particular for #! scripts.
>>> This seems like it would strongly motivate toward a (possibly directory-
>>> scoped or system-scoped) package cache. Not saying thats a bad
>>> thing, just that it seems different than the executable packaging
>>> Swift has today with “Apps".
>>>
>>> -DW
>>>
>>>
>>>
>>> _______________________________________________
>>>
swift-evolution mailing list
>>> swift-evolution at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>>
>>
>> _______________________________________________
>> swift-evolution mailing list swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>
> _________________________________________________
> swift-evolution mailing list swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151230/5eb573d3/attachment-0001.html>
More information about the swift-evolution
mailing list