Re: [swift-users] Type alias with a "where" clause specifying required associated type

2017-09-05 Thread Slava Pestov via swift-users
It’s just placeholder syntax for ‘a value whose type is given by a generic parameter in the following signature’. Slava > On Sep 5, 2017, at 4:44 AM, Rudolf Adamkovič wrote: > > I see. TBH, I don’t understand why it says “Any” in the "generalized > existentials” but everything else is clear.

Re: [swift-users] XML parsing on Linux, with Swift 3.1

2017-09-05 Thread Taylor Swift via swift-users
The CI builds on Swift 4, i believe it should work fine on master too but it’s not tested there. Also I don’t think snake_case is C++ convention, i’ve seen both. I use snake_case because camelCase looks too similar to UpperCamelCase which is reserved for type names. On Tue, Sep 5, 2017 at 3:43 AM,

Re: [swift-users] XML parsing on Linux, with Swift 3.1

2017-09-05 Thread Saagar Jha via swift-users
Saagar Jha > On Sep 5, 2017, at 01:19, Georgios Moschovitis via swift-users > wrote: > > Indeed it works, but I don’t get it. > What’s the difference? > > -g. > > PS: Btw, my original code was giving `seg-fault: 11` even on macOS. > >> On 5 Sep 2017, at 10:53 AM, CK TUNG via swift-users > <

Re: [swift-users] Foundation bug or indended?

2017-09-05 Thread Jordan Rose via swift-users
It's semi-intended. When the compiler imports (NS)Operation into Swift, it uses the Swift naming convention…but it also declares a property with the old name, 'executing', in order to give better error messages if someone tries to use the Objective-C name. That's what's colliding with your priva

Re: [swift-users] Is it possible to install Swift 4 on El Capitan with Xcode 8?

2017-09-05 Thread Jordan Rose via swift-users
> On Sep 4, 2017, at 20:06, Mr Bee via swift-users > wrote: > > > 2017-09-05 3:47 GMT+07:00 Fritz Anderson via swift-users > mailto:swift-users@swift.org>>: > > In your position, I’d go to the Downloads part of Swift.org > and fetch the latest build of the Swift 4 toolc

Re: [swift-users] No Generic Decoders?

2017-09-05 Thread Itai Ferber via swift-users
Hi Jon, This was a conscious choice in the API design, for three main reasons: 1. There is a big difference between the API surface exposed at the top-level for encoding and decoding and the middle levels. A method like `decode(_ type: T, from data: Data)` is really only appropriate at the to

Re: [swift-users] Type alias with a "where" clause specifying required associated type

2017-09-05 Thread Rudolf Adamkovič via swift-users
I see. TBH, I don’t understand why it says “Any” in the "generalized existentials” but everything else is clear. Thank you Slava! R+ > On 5 Sep 2017, at 01:52, Slava Pestov wrote: > > Hi Rudolf, > > What you are describing is not possible right now. The protocol PointType > cannot be used

Re: [swift-users] XML parsing on Linux, with Swift 3.1

2017-09-05 Thread Georgios Moschovitis via swift-users
> > Foundation (NS)XML parsing is a little buggy and incomplete, check out > github.com/kelvin13/swiftxml for a pure swift implementation Your implementation seems to be Swift4 only? -g. PS: Also, I am a bit put-off by some C/C++ coding conventions (e.g. snake_case) > >> On Sep 5, 2017, at

Re: [swift-users] XML parsing on Linux, with Swift 3.1

2017-09-05 Thread Taylor Swift via swift-users
Foundation (NS)XML parsing is a little buggy and incomplete, check out github.com/kelvin13/swiftxml for a pure swift implementation > On Sep 5, 2017, at 1:01 AM, Georgios Moschovitis via swift-users > wrote: > > Hi, > > I would like to parse an RSS feed using Swift 3.1 on Linux. > I tried to

Re: [swift-users] XML parsing on Linux, with Swift 3.1

2017-09-05 Thread Georgios Moschovitis via swift-users
Indeed it works, but I don’t get it. What’s the difference? -g. PS: Btw, my original code was giving `seg-fault: 11` even on macOS. > On 5 Sep 2017, at 10:53 AM, CK TUNG via swift-users > wrote: > > This revised code, as below, works without segmentation fault > > import Foundation > > clas

Re: [swift-users] XML parsing on Linux, with Swift 3.1

2017-09-05 Thread CK TUNG via swift-users
This revised code, as below, works without segmentation fault import Foundation class ParserDelegate: NSObject, XMLParserDelegate {          func startParsing(_ xml:String) {         let data = xml.data(using: .utf8)!         let xmlParser = XMLParser(data: data)         xmlParser.delegate = sel