iOSNext: Paul Ardeleanu – 10 Reasons You’ll Love Swift

My notes from Paul‘s talk at iOSNext.

Swift: A new programming language for iOS and OSX

TIOBE Index for Nov 2014 – Swift is at #18. A language that is 5 months old – more popular than Scala, Haskell… Fortran!

Proven to be quite a hit with developers, and there are reasons for that.

Why do we have a new programming language?

What is the most important thing for Apple? Most important thing is the stock price, has a legal responsibility.

Apple passed 120 price, first company valued over $7B, most valuable company in the world.

Make money with good hardware. Most money made selling products. To have successful product, needs successful software. Need successful app stores.

In app stores have millions of apps. Who writes them? Apple needs developers?

How do you make sure you have the best developers in the world

  • Keep existing ones happy.
  • Attract new ones.

Objective-C:

  • 30 years old. Has evolved (blocks, ARC etc).
  • Drastically different – teaching Objective-C, have to tell people to use square brackets.
  • Not entirely future proof.

How did this happen?

  • Seemed overnight, but signs for the last 4 years.
  • Go on LLVM, see commits, and swift mentioned, but none knew what it was.
  • GCC -> LLCV-GCC -> LLVM.
    • “What if we had Objective-C without the baggage of C?”
    • “Apple just sherlocked my CV”
    • “We are all of us beginning again”

What if you get Objective-C without C? You get Objective. Doesn’t make sense.

10 Reasons You’ll Love Swift

  1. No C. No main() function. No [] or ;
  2. Modern. Tuples. Nil coalescing operator.
  3. Safety. Constants and variables. Don’t specify the type – inferred. No implicit conversion. Switch – must be exhaustive.
  4. Optionals.
  5. Mix and match. Can use Objective-C and Swift together in the same project.
  6. Functions are first class citizens.
  7. Magic.
  8. Emoji. If this evolves, might be a good way to teach kids programming – highly visual.
  9. Playgrounds
  10. Swift REPL

Like new language. Will be awkward, will feel frustrated. But eventually you’ll get it!

One thought on “iOSNext: Paul Ardeleanu – 10 Reasons You’ll Love Swift

Leave a Reply