Re: [swift-users] Ambiguous reference to members of FileHandle

2017-02-23 Thread Dmitry Shevchenko via swift-users
Thank you. On Wed, Feb 22, 2017 at 6:37 PM Jacob Bandes-Storch wrote: > I just started a swift-evolution thread related to this: > https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170220/032890.html > > There's also a relevant bug: https://bugs.swift.org/browse/SR-2654 > > On Wed,

Re: [swift-users] Assigning a variable to itself

2017-02-23 Thread Fritz Anderson via swift-users
I’ll leave it to others to explain whether this is the intended behavior, but the further I get from properties being idempotent, the more grief I’ve had. Especially when (as I assume is your real use case) I tried to assign something to itself to force a didSet {} during viewDidLoad(). If I m

Re: [swift-users] question about covariant subtyping

2017-02-23 Thread Joe Groff via swift-users
> On Feb 23, 2017, at 4:45 AM, Michael Roitzsch > wrote: > > So I understand that the first issue is a bug and the second may be a bug or > may be intentional. Would you advise that I file them both as bugs then? They're both bugs, ultimately. Slava was just pointing out that the second may

Re: [swift-users] question about covariant subtyping

2017-02-23 Thread Michael Roitzsch via swift-users
So I understand that the first issue is a bug and the second may be a bug or may be intentional. Would you advise that I file them both as bugs then? Michael ___ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/sw

Re: [swift-users] Using withUnsafePointer on char arrays within C structs

2017-02-23 Thread Quinn "The Eskimo!" via swift-users
On 23 Feb 2017, at 10:31, Martin R wrote: > Is that simplified guaranteed to work? Based on a previous conversation I had with the Swift folks about this, yes. However, I don’t work on the compiler so it’s possible I misunderstood. Perhaps someone from SwiftLand™ will chime in here. Share a

Re: [swift-users] Using withUnsafePointer on char arrays within C structs

2017-02-23 Thread Martin R via swift-users
Is that simplified guaranteed to work? The Swift book says that > As an optimization, when the argument is a value stored at a physical address > in memory, the same memory location is used both inside and outside the > function body. but also > Write your code using the model given by copy-i

Re: [swift-users] Using withUnsafePointer on char arrays within C structs

2017-02-23 Thread Quinn "The Eskimo!" via swift-users
On 22 Feb 2017, at 22:16, Russell Finn via swift-users wrote: > … is (2) the best I can do for now? Yes. btw You can simplify the code to this: var description: String { var tmp = self.path return String(cString: &tmp.0) } but it still needs that copy. > And is this