I like the fact that this would retain simplicity for basic uses - developers
could continue to use 'import Mod' and not even know about the more advanced
syntax unless they need that power. The additional syntax seems like a natural
progression from the base case.
Kevin, I understand the motiv
I'm (personally) not such a fan of saying "import just this one thing" or
"import everything except this one thing"—you end up trying to use
UIImage(named:), and then realizing you haven't imported any of the top-level
names. But "import qualified" seems great to me, and "import Foo as Bar" also
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 m
+1
-Thorsten
> Am 29.12.2015 um 01:47 schrieb Kevin Ballard via swift-evolution
> :
>
> I like the idea here, but I'm not sold on the syntax. I also do explicitly
> want an `import qualified`. And with qualified imports, I question whether we
> really need to support renaming in the import sy
How is this done for things like the Darwin module?
~Robert Widmann
2015/12/28 20:19、T.J. Usiyan via swift-evolution
のメッセージ:
> +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 rela
+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-evoluti
> On Dec 28, 2015, at 5:07 PM, Chris Lattner via swift-evolution
> 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 #!
I like the idea here, but I'm not sold on the syntax. I also do
explicitly want an `import qualified`. And with qualified imports, I
question whether we really need to support renaming in the import
syntax here.
I'm tempted to say we should just crib Haskell's import rules
(https://wiki.haskell.or
> On Dec 26, 2015, at 9:12 PM, Developer via swift-evolution
> wrote:
>
> I opened a radar a while ago about improving the import syntax in Swift and
> haven’t received much of a response, so I’ll try to expand on my thoughts in
> there here.
>
> I’ve always been in love with the way Agda do
The 'except' change is interesting, but it's still a context switch that can
wind up confusing people. I think that's partly why Agda has the 'renaming'
operation separate in the first place.
~Robert Widmann
2015/12/27 10:30、T.J. Usiyan via swift-evolution
のメッセージ:
> import Foo using (bar, B
> T.J. Usiyan wrote:
>
> import Foo using (bar, Baz, qux, waldo as fred) // a "whitelist import"
> import Foo hiding (bar, Baz, qux, waldo as fred) // a "blacklist import"
>
> Is nice but `hiding… (waldo as fred)` is confusing. Am I hiding waldo?
You're right That's also what Robert pointed ou
*import* Foo *using* (bar, Baz, qux, waldo *as* fred) // a "whitelist
import"
*import* Foo *hiding* (bar, Baz, qux, waldo *as* fred) // a "blacklist
import"
Is nice but `hiding… (waldo as fred)` is confusing. Am I hiding waldo? It
is also strange to look in that list for things that I am hiding
> On 27 Dec 2015, at 07:12, Developer via swift-evolution
> wrote:
>
> Therefore, I propose the introduction of 3 agda-esque operations for imports
> to replace the usual `import {func|typealias|struct|class|enum|etc.}` syntax:
>
> • import Foo using (bar, Baz, qux, corge, …)
> • i
I opened a radar a while ago about improving the import syntax in Swift and
haven’t received much of a response, so I’ll try to expand on my thoughts in
there here.
I’ve always been in love with the way Agda does Modules and imports. The
syntax is wonderfully natural, and the features it provi
14 matches
Mail list logo