
Swift Has Reached 1.0 - mattquiros
https://developer.apple.com/swift/blog/?id=14
======
bezalmighty
"You can now submit your apps that use Swift to the App Store. "-that's great
news!

For Hackers in SF: We are running a Swift Hackday at GitHub HQ on the 27th
September. There will be food, drink, swag and lots of other Swift hackers!
Check it out & RSVP at
[http://SwiftHack.splashthat.com](http://SwiftHack.splashthat.com)

------
Someone
So, what kind of 1.0 release is this?

\- It's Keynote time/September 9, so we call what we have, crashing bugs
included, 1.0.

\- We culled the features that do not work reliably yet, polished the good
parts, and called it 1.0.

\- This is a/the set of features that we consider to form a good product, and
all features work reasonably well.

~~~
mikeash
I'd say it's a bit of all three.

This is _clearly_ a marketing-driven 1.0. It's really not ready, and wouldn't
reasonably be called a 1.0 otherwise.

However, they've been pretty good about sticking to a solid set of features
and not over-extending themselves for this initial release. It seems fairly
clear that they intend to go in and fill out a lot of stuff later, and
preferred a smaller set of solid features to start with rather than trying to
do everything at once.

~~~
jobu
They've also been pretty clear that the language is going to be in a state of
flux for long while. From the Swift Blog:

 _" Binary Compatibility and Frameworks

While your app’s runtime compatibility is ensured, the Swift language itself
will continue to evolve, and the binary interface will also change. To be
safe, all components of your app should be built with the same version of
Xcode and the Swift compiler to ensure that they work together.

This means that frameworks need to be managed carefully. For instance, if your
project uses frameworks to share code with an embedded extension, you will
want to build the frameworks, app, and extensions together. It would be
dangerous to rely upon binary frameworks that use Swift — especially from
third parties. As Swift changes, those frameworks will be incompatible with
the rest of your app. When the binary interface stabilizes in a year or two,
the Swift runtime will become part of the host OS and this limitation will no
longer exist."_

------
no_future
Can anyone tell me about the interop situation? I'm working on my first iOS
app and doing it all the old way with Obj-C, and some things have been a
little difficult to grok even though they've been around a
while(AVFoundation). I'm very interested in the new Metal graphics API that
Apple showed at their presentation. Not sure if I should just switch to Swift
for everything now or continue learning/working in Obj-C and slowly
transition.

~~~
mayoff
I wouldn't recommend Swift to anyone that's new to the iOS SDK. I answered
this question recently on stack overflow
([http://stackoverflow.com/a/25751738/77567](http://stackoverflow.com/a/25751738/77567)).
Here's what I said:

\- Objective-C will be around and supported for a long time. (Apple has a
massive amount of Objective-C source code that it's not going to port to Swift
any time soon.)

\- Almost all iOS tutorials, examples, and books use Objective-C.

\- Almost all iOS-specific third-party source code you might want to use is
implemented in Objective-C.

\- It's easier to use C and C++ libraries from Objective-C than from Swift.

\- There are many Objective-C experts you can get help from. There are very
few Swift experts.

\- The Swift language and its standard library are currently not very well
documented.

Stick with Objective-C for now. When you're comfortable with the iOS SDK and
Swift is better documented, you can consider learning Swift.

~~~
SiVal
Apple could dramatically accelerate this process by switching their own new
development from ObjC to Swift. The huge amount of legacy code means this
couldn't happen overnight, but if Apple is obviously making the switch for
their own new development, Swift will have a huge credibility boost. Apple
wouldn't be able to abandon it (or let development stall) without hurting
themselves. Until Apple puts themselves at a similar degree of risk as other
Swift adopters, developers are going to wonder about the wisdom of committing
to an Apple-only platform that Apple hasn't committed to.

------
melling
I have a list of Swift resources that I've been collecting:
[http://www.h4labs.com/dev/ios/swift.html](http://www.h4labs.com/dev/ios/swift.html)

~~~
niutech
The more established Swift resource center & community forum is here:
[http://swiftlang.eu](http://swiftlang.eu)

------
thurn
Any word on whether they added static library support? Not having it is kind
of a dealbreaker for my workflow, unfortunately.

~~~
marcomonteiro
Can you elaborate on how static library support is a hard requirement for your
workflow and why frameworks (LLVM modules) don't meet your needs. I'm
genuinely curious as I haven't had a chance to do any real work in Swift yet.

Fellow Googler btw.

~~~
thurn
A lot of tools don't support them yet. Robovm in my case (I filed a bug
against them, though), but also Cocoapods, for example.

------
stephenaevans
Might be time to learn Swift.

------
akkartik
GM?

~~~
GuiA
Golden Master. Typically refered to the version of the software that would get
burned on floppies/CDs, although the word has taken a more fluid meaning with
ubiquitous digital distribution.

------
krschultz
This might be a stupid question, but does Objective-C have versions?
Objective-C was always talked about in terms of the iOS version, even when the
language itself was changing (eg blocks).

~~~
btn
New Objective-C features are introduced with new versions of the compiler (and
Xcode tools/SDK), but each feature may be deployed on different versions of
iOS/OS X (depending on how much support they need from the underlying
runtime/operating system). This table breaks it down:
[https://developer.apple.com/Library/mac/releasenotes/Objecti...](https://developer.apple.com/Library/mac/releasenotes/ObjectiveC/ObjCAvailabilityIndex/index.html)

------
Yuioup
Can somebody tell me why in 6-7 years I will be rewriting Swift apps ?

------
jehb
Sorry, I'm pretty sure you meant Swift has reached 2.0. And that was a couple
of months ago. Also why are you people talking about Swift like it's a
programming language and not an object storage system? :)

[http://opensource.com/business/14/7openstack-swift-brings-
st...](http://opensource.com/business/14/7openstack-swift-brings-storage-
policies)

------
smaili
Stupid question but is Swift just compiled into Objective-C? I'm asking
because I'd like to know if I can write an app in Swift that can run on iOS6.

~~~
jlmendezbonini
> I'd like to know if I can write an app in Swift that can run on iOS6.

No. From Xcode6 release notes:

"iOS 7 and OS X 10.9 minimum deployment target

The Swift compiler and Xcode now enforce a minimum deployment target of iOS 7
or OS X Mavericks. Setting an earlier deployment target results in a build
failure."

~~~
mwcampbell
To clarify, is Xcode 6 enforcing a minimum deployment target of iOS 7 even if
the app is written in Objective-C and not Swift? If so, I think I'll need to
stay on Xcode 5 a bit longer.

~~~
altyus
iOS6 user base will be miniscule in a few weeks unless you are targeting
corporate or education markets which update slowly.

------
tzakrajs
What is this? Javascript for Mac?

~~~
nobbyclark
Yes. And put together in even less time than JavaScript 1.0

~~~
andrewchambers
That isn't true. Swift has been dev for quite a long time in secret.

~~~
kybernetyk
Regarding which basic features they had to add after the first wave of beta
feedbacks I don't believe them that they have been developing + using the
language for years.

~~~
andrewchambers
It wasn't in heavy use, Chris Lattner was experimenting with it solo i
thought.

------
wycats
I don't believe this is the traditional definition of "reached 1.0".

~~~
nardi
What do you mean?

~~~
wycats
"You’ll notice we’re using the word “GM”, not “final”. That’s because Swift
will continue to advance with new features, improved performance, and refined
syntax"

Typically, when people say that a language "reached 1.0", they mean the very
end of that process.

~~~
nardi
Ah. Well, other languages also get new features, improved performance, and
refined syntax after 1.0. Are you objecting to the implication that the pace
of development here will be more rapid, or an assumption that they plan on
making backwards-incompatible changes?

~~~
wycats
I'm objecting to saying "we have reached 1.0" when what they really mean is
"we are releasing 1.0 beta 1"

~~~
nardi
Didn't they do that already back in June?

------
codemac
My brother has been using swift to learn some programming.

I don't have a mac, let alone iTunes.

Is there a legal way for me to download/purchase a manual to help him with his
progress?

~~~
beggi
The language manual is free at apple.com

~~~
lukifer
And it's quite a good manual at that. Starts with a high-level overview of
language features in plain English, then provides a firehose of nitty-gritty.

------
DAddYE
Hey guys, do you know if swift will be ever open-sourced? After the WWDC they
said that was early to __think __about it while in beta. So, what 's the
status now?

~~~
CmonDev
Their live feed yesterday was only available on Safari. Isn't it obvious that
they want their herd only inside of a barn?

~~~
romanovcode
I don't get why this is down-voted. I think it is excellent point.

My thoughts exactly when tried to view the live stream.

~~~
sbuk
Its being downvoted because of the derogatory naming of Apple users.

------
PopsiclePete
I can't believe Apple would release a brand-new language with zero baked-in
support for concurrency. In this day and age? Looks like developers will have
to resort to 2nd grade efforts like GCD. I just don't get it. There's no
excuse for it. Port Go's channels and go-routines to it, or something else,
but come on - it's 2014, not 1998?

~~~
easytiger
Well they are the people who sold a phone with no support for background
tasks. They can do as they please.

~~~
threeseed
iOS supports the most common background tasks.

~~~
easytiger
It didn't though for many years

~~~
gress
Which was a user-friendly decision during the period where android phones
frequently died after only 4 hours of use.

~~~
easytiger
> frequently died after only 4 hours of use.

I've never had a phone die after 4 hours of use and I've had the 1st Gen
iphone and the HTC G1

------
Jweb_Guru
I am not the biggest Apple fan in the world, and will probably not use Swift
professionally, but I'm still super enthused about it as a language and I am
glad it's entering the marketplace. We're going to have sum types and type
inference in a mainstream language! For the first time, professors can teach a
language like SML and have a good response to the question "so how is this
going to help me in the real world?" I really, genuinely hope this will lead
to better choices of languages in introductory programming classes.

~~~
pjmlp
They didn't need Swift for real world examples.

F#, Scala, OCaml, Haskell, Clojure already have uses at big financial
corporations and bio-informatics.

However, Swift is another great way for spreading the ML gospel to mainstream
developers, specially if it slowly takes Objective-C's place in Apple's heart.

~~~
tomp
Does Clojure support pattern matching? AFAIK, the only thing that is
"functional" about Clojure is its immutable data structures (and closures, but
even JS has those).

~~~
pjmlp
Funny to call a Lisp dialect functional between quotes. When Lisp and lambda
calculus are the very genesis of FP.

Yes, Lisp can do pattern matching, usually implemented via macros,

In Clojure you use the core.match library.

~~~
tel
Well, 1930's functional programming. Those techniques developed into various
type theories pretty quickly (at the time for foundational reasons, but also
for comprehension/management/expressiveness reasons).

Or if you have a more strict reading, Lisp is implementation-driven FP in the
70s compared to theory-driven FP from the time.

~~~
pjmlp
Yes, but keeps being functional programming.

Even Haskell does not have all the mathematics theory that one could apply to
functional programming.

A programming language to be representative of a programming paradigm does not
need to have 100% of all ideas out there.

~~~
tel
I think it kind of does. FP is a moving target---more of a cultural identity
than a technical definition. As it becomes more mathematically focused it will
become less applicable to (some) Lisps. If this progression continues and
dependently typed languages become increasingly practical we may someday call
them FP-without-quotes and even displace things like Haskell and OCaml.

~~~
pjmlp
Except you assume there is ONE definition of what FP is, which every
researcher will have a different opinion of.

~~~
tel
Hardly. I even begin my commentary noting that "FP is a moving target" and a
social phenomenon more than a technical one. I personally avoid the term as
possible in much the same way I avoid the term "data scientist". If you want
me to do Data Science I'll get excited and ask you for statistical project
details.

------
cdnsteve
That's fantastic! Now, too bad I can't watch your video tutorials on my
Macbook Pro using Chrome. Or Windows 7 using Chrome. The messaging on the site
declares it requires Safari. So much of the open web... Quietly moves along to
Android.

~~~
threeseed
Apple's stream is just HTTP Live Streaming with H.264 IIRC.

Which means the issue is quite clearly with Google and their insistence on
using VP8/WebM instead of what almost every other company is using.

~~~
jallmann
Safari is the only browser that implements HLS except recent Android. Chrome
does support H.264 in HTML5.

~~~
bellerocky
I think HLS is pretty awesome and this hasn't anything to do with HTML5 as
what Chrome supports doesn't allow for live streaming, which is why sites like
Twitch still use flash for Chrome. Chrome should support HLS, but they aren't
going to for anything but Android, so flash it is for the foreseeable future.
If anyone knows why or where I am mistaken I would like to know.

~~~
jallmann
The issue is not black and white. Why should Chrome implement Apple HLS,
rather than Adobe HDS, Microsoft SmoothStreaming, or MPEG DASH, among other
HTTP streaming formats? What about RTSP -- a protocol _designed_ for
streaming, which Android had good support for in the video tag?

In any case, live streaming in Chrome is possible with WebM, or even WebRTC.
Flash is not ideal either, but at least it has consistent support on the
desktop.

~~~
bellerocky
If it's possible why hasn't anyone implemented such a thing? I'd like to
implement such a thing and I wouldn't know where to start, but I would with
HLS. This is the 1990's all over again. Different browsers supporting
different standards, different video encodings, different JavaScript features,
sometimes, when I'm having a spell, I'm not so sure competition is actually
all that great anymore.

And no you cannot stream with webrtc without building a complicated back end
webrtc MCU implementation which requires significant engineering and is not at
all supported by the creators of webrtc who are focused on peer to peer inside
browsers.

~~~
Ogre
In the 1990s, people used to write these things called plugins to add
features, like support for specific video containers and codecs, to browsers.
Now I guess browsers have to have everything built in or not at all.
"Progress".

------
stefantalpalaru
Why is a programming language without any open source implementation getting
so much attention?

~~~
romanovcode
Because it's Apple.

When Swift was released every hipster and his cat jumped the wagon on how
great it is. I even saw someone trying to make webstack out of it.

~~~
danford
Don't know why you're getting down voted, sure Swift has some neat features,
but if any other company released something like this that was closed source,
no one would really care.

~~~
jp555
Any other company who's language runs over 1.3 million apps used by hundreds
of millions of people on average every 6 minutes?

~~~
romanovcode
Oracle and Microsoft. But their languages (Java and C#) are not platform
dependent.

Just an example:

>Microsoft released C# Roslyn source code, announce Linux support with K
Runtime this year

They're going to the right direction, maybe someday...

>Apple released Swift, closed source language that runs only on one platform
(Mac)

Apple is so awesome, keep innovating guys! Now let's write a webstack and
nosql db using Swift!

~~~
mnem
C# is hideous to get running consistently (if at all) with recent versions and
libraries cross platform. Perhaps this will change in the future, but they've
not been particularly brilliant about it over the past decade

~~~
romanovcode
I don't know what libraries you talking about but nearly everything from nuget
starting with image processing and ending with orms and crypto work just fine
on linux.

Even more when K will come out I don't think there will be any worries at all.

~~~
threedaymonk
NuGet doesn't quite work just fine on Linux, but it's getting better. Slowly.

[http://nuget.codeplex.com/SourceControl/network/forks/threed...](http://nuget.codeplex.com/SourceControl/network/forks/threedaymonk/fixoutputinfiniteloop/contribution/6321)

~~~
romanovcode
Yea, maybe, I don't even know. I develop on Windows and only deploy to Linux.

Let's just hope that with the release of VS2014 and K Runtime all those things
will get solved like MS promised.

