Live data from Hacker News

Swift 1.2 and Xcode 6.3 beta

developer.apple.com

51–60 of 94 posts

Re: Swift 1.2 and Xcode 6.3 beta

#51
post #45
post #19

Earlier quoted context omitted.

You only need to be at the free level though, not the $100/year, so it's not much of a barrier.

That doesn't seem to be the case. I just made a free account quick to test this, and it won't let me access the betas without being a member of the paid iOS developer program.

My free account can access the release notes though. Which I admit is not that great.

Re: Swift 1.2 and Xcode 6.3 beta

#52
post #51
post #45

Earlier quoted context omitted.

That doesn't seem to be the case. I just made a free account quick to test this, and it won't let me access the betas without being a member of the paid iOS developer program.

My free account can access the release notes though. Which I admit is not that great.

How are you getting to them? Trying the obvious avenues from a free account only gets me release notes up to 6.1.1.

Re: Swift 1.2 and Xcode 6.3 beta

#53

This might be easily overlooked: optional has been introduced (back-ported?) to Objective-C in the form of nullability annotation!

No it hasn't.

Optional is a Swift type that contains a value of any type. Obj-C doesn't have anything matching that behavior at all.

What's been done here is Obj-C has gained the ability to annotate any pointer valued type as either nullable or non-nullable. This does not affect the runtime behavior of the code in the slightest. It doesn't even affect the semantics of Obj-C. All it does for Obj-C is let the compiler yell at you if you pass nil to a non-nullable parameter / property.

The real point of these annotations is so Swift can be more intelligent when translating the obj-c API to Swift, choosing to use the correct optional type (or no optional type at all).

Re: Swift 1.2 and Xcode 6.3 beta

#54
post #47

Earlier quoted context omitted.

I'm not so sure. Chris Lattner was giving some hints around Twitter on how big deal they want to make out of Swift (that is, a ubiquitous systems program). This gives me hope that it'll become open as Clang and ported to other platforms.

Just like FaceTime. It won't happen and all the rumors and gossip based on a few comments will just give false hope to people. Swift was designed to lock-in developers just when objc java converters were gaining popularity.

Was introduced to this today: http://www.elementscompiler.com/elements/silver/

Re: Swift 1.2 and Xcode 6.3 beta

#55
post #47

Earlier quoted context omitted.

I'm not so sure. Chris Lattner was giving some hints around Twitter on how big deal they want to make out of Swift (that is, a ubiquitous systems program). This gives me hope that it'll become open as Clang and ported to other platforms.

Just like FaceTime. It won't happen and all the rumors and gossip based on a few comments will just give false hope to people. Swift was designed to lock-in developers just when objc java converters were gaining popularity.

FaceTime is different. I heard how everyone at Apple was surprised when Jobs mentioned "open standard". Here, on the other hand, core team is looking forward making Swift a bigger deal than just Apple's pet language.

Sorry, talks about "designed to lock in" is a non-falsifiable theory. If you wanted to build a language for the future and even make it open once it's tested and polished, you would do the same thing: gather a small team to work privately without distractions, make it grow in a controlled environment (so you can safely make breaking changes fixable with some migration tools) and when it's mature enough, release it wide open.

I think there's a practical reason for Apple not to lock-in using a programming language. Proprietary tools limit amount of talent being provided to the platform. Really smart brains would spend time either in suboptimal open platforms or choose some other garden (e.g. .NET, Java). It's one thing to lock in consumers into an ecosystem, it's another to detract smart developers by threatening them with lock in.

Re: Swift 1.2 and Xcode 6.3 beta

#56
post #52
post #51

Earlier quoted context omitted.

My free account can access the release notes though. Which I admit is not that great.

How are you getting to them? Trying the obvious avenues from a free account only gets me release notes up to 6.1.1.

This link from the blog post works for me from my very old free account: https://developer.apple.com/devcenter/download.action?path=/...

Re: Swift 1.2 and Xcode 6.3 beta

#57
post #56
post #52

Earlier quoted context omitted.

How are you getting to them? Trying the obvious avenues from a free account only gets me release notes up to 6.1.1.

This link from the blog post works for me from my very old free account: https://developer.apple.com/devcenter/download.action?path=/...

Interesting. That works from my free account as well. However, I see no way to actually obtain that URL through the official site. Did I miss something? Is this a bug on their part?

Re: Swift 1.2 and Xcode 6.3 beta

#58
post #26

Awesome, the ability to unwrap multiple optionals on one line should be bolded, underlined and all caps at the top of this article. Seriously though, this is an everyday pain point that happens all the time when writing Swift. Glad Apple is listening to developer feedback on this stuff. Translation for those unfamiliar with Swift: Swift has a relatively strong type system. If a variable in Swift can be null at any po…

If let (and optionals in general) is my favorite Swift feature and has immediately made my code 10x more stable from the get-go. Glad to see it get expanded like this.

if-let is great. I don't know where it started (apparently upthread they say Rust and swift have been swapping the idea) but Clojure has had it since 2008.[0]

    (if-let [name name-whose-value-is-possibly-null]
      (something-to-do name))
[0] https://clojuredocs.org/clojure.core/if-let

Re: Swift 1.2 and Xcode 6.3 beta

#59
post #47

Earlier quoted context omitted.

Just like FaceTime. It won't happen and all the rumors and gossip based on a few comments will just give false hope to people. Swift was designed to lock-in developers just when objc java converters were gaining popularity.

FaceTime is different. I heard how everyone at Apple was surprised when Jobs mentioned "open standard". Here, on the other hand, core team is looking forward making Swift a bigger deal than just Apple's pet language. Sorry, talks about "designed to lock in" is a non-falsifiable theory. If you wanted to build a language for the future and even make it open once it's tested and polished, you would do the same thing: ga…

There is always hope I guess.

Swift library is Cocoa and even if they eventually open Swift, it is going to be as useful as Objective-C is outside Mac OS X and iOS.

Personally I don't care. What I care is about tools that make my customers happy.

Re: Swift 1.2 and Xcode 6.3 beta

#60
post #46

Earlier quoted context omitted.

Swift borrowed "if let" from Rust, not the other way around.

"The if let construct is based on the precedent set by Swift," https://github.com/rust-lang/rfcs/blob/master/text/0160-if-l...

That's putting it a bit mildly. Speaking as the author of that RFC, Rust's "if let" would never have existed if it were not for Swift. When I saw Swift's "if let" I immediately knew I wanted it in Rust. I also generalized it to arbitrary patterns at that time, since Rust doesn't fetishize Option the way Swift fetishizes Optional.

I am glad to see Swift 1.2 expanding "if let" to multiple clauses. But I do wish it supported arbitrary values instead of just Optional.

Post reply on HN