Hi Trevör,
What you’re asking for has been discussed extensively and a very thorough
proposal was drafted by Austin Zheng:
https://github.com/austinzheng/swift-evolution/blob/az-existentials/proposals/-enhanced-existentials.md
This is not something that is likely to make it into Swift 4
Hello everyone !
I am currently writing a project where I would like to do something similar to
this:
protocol ProtocolA {
associatedtype U
var someVariable : U { get set }
func someFunction(_ x:U) -> U
}
class SomeClass {
var someProperty : ProtocolA where ProtocolA.U == T
}
> Le 10 févr. 2017 à 18:04, Trevör Anne Denise a
> écrit :
>
> Hi Matthew,
>
> Thanks for this quick reply, happy to see that this is something the
> community is working on, this will make protocols even more useful!
>
> Since this isn't implemented yet, I am
This seems like a bug (missing feature?) in how the API is imported for
Swift. You might consider filing a Radar.
On Thu, Feb 9, 2017 at 3:12 PM Michel Fortin via swift-users <
swift-users@swift.org> wrote:
> The `string` property of `NSTextStorage` is of type `String`, but the
> contract it
~Robert Widmann
2017/02/10 3:35、Tino Heth via swift-evolution
のメッセージ:
>
>> Easy explained - The problem rises indeed not from the added features but
>> from the fp group that imposes it’s usage in the Standard libraries and “the
>> swifty way”. I like many
Got some clarity on this from Apple folks on Twitter:
https://twitter.com/jtbandes/status/830159670559993856
On Fri, Feb 10, 2017 at 12:54 PM, Michel Fortin
wrote:
> I did file one (30314719). I might not have explained the problem clearly
> enough, I suppose, because
To me it would seem more logical as "for x in array? { }" — to parallel
"for case let x? in array { }"
On Fri, Feb 10, 2017 at 1:03 PM, Rick Mann via swift-users <
swift-users@swift.org> wrote:
> I love the idea of for in? (Or even for? In). You should pitch that to
> evolution.
>
> Sent from
How would you write
for x in array as?
With parentheses? I like "in?" because it mimics "as?".
Sent from my iPhone
> On Feb 10, 2017, at 13:57, Jacob Bandes-Storch wrote:
>
> To me it would seem more logical as "for x in array? { }" — to parallel "for
> case let x? in
I love the idea of for in? (Or even for? In). You should pitch that to
evolution.
Sent from my iPhone
> On Feb 10, 2017, at 07:04, Tino Heth <2...@gmx.de> wrote:
>
>
>> Is there any concise way to write the following?
>>
>> if let collection = someOptionalCollection
>> {
>>for item in
On Thu, Feb 09, 2017 at 12:31:00AM +, Jin Wang wrote:
> Hey David,
>
> I'm currently using the existing REPL to power the code execution.
> Eventually, when Swift becomes more stable and Linux gets more support, we
> might be able to do visualisations using UIKit or its alternatives. Right
>
On Thu, Feb 09, 2017 at 12:31:00AM +, Jin Wang wrote:
> Hey David,
>
> I'm currently using the existing REPL to power the code execution.
> Eventually, when Swift becomes more stable and Linux gets more support, we
> might be able to do visualisations using UIKit or its alternatives. Right
>
> Easy explained - The problem rises indeed not from the added features but
> from the fp group that imposes it’s usage in the Standard libraries and “the
> swifty way”. I like many features of Swift (or I wouldn’t be here) but I
> don’t want to live in Haskel world. And for some reason these
In case this is useful to someone, this is the workaround I'll be using:
```
class CustomTextStorage: NSTextStorage {
private let backingStore: NSMutableAttributedString
// This method should never get called from Objective-C as it doesn't
respect
// the API contract
> Is there any concise way to write the following?
>
> if let collection = someOptionalCollection
> {
>for item in collection
>{
>}
> }
I've been thinking about that lately, but haven't had the time to look wether
someone on evolution already proposed a "for in?"-loop…
Imho the
> On Feb 10, 2017, at 10:04 AM, Tino Heth via swift-users
> wrote:
>
> for i in? test {
> print(i)
> }
>
> Imho looks even better, but this would need an extension of the language
> itself…
Oh, yes please!
Please post on evolution.
15 matches
Mail list logo