The past, present and future of swift, Voxxed Belgrade 2016

41
The Past, Present and Future of Swift Voxxed Belgrade @chrischinch

Transcript of The past, present and future of swift, Voxxed Belgrade 2016

The Past, Present and Future of Swift

Voxxed Belgrade @chrischinch

My Apple Adventure

The Past of SwiftObjective-C

Score Card+ Thin Runtime

+ Leverage GCC and Libraries

+ Low barrier to entry (At the time)

- Larger than C / C++

- Namespace support

- Optimisation

- High barrier to entry (Now)

- Closed Source

The PastRelease

–Not everyone is a fan…

“Type a quote here.”

2.2+ Apache License 2.0December 3, 2015

The Present

What’s Included?

• Compiler

• Standard Library

• SDK Overlays

• Debugger

• Package Manager

Who’s using it?

• Libraries (Alamo, Vapor, Perfect etc)

• Swift AI

• Duolingo, Dub Smash, EyeEm*

• Pandora, Twitter, FitBit, Groupon

Installation - MacOS

swiftenv install 2.2

Installation - Linux

sudo apt-get install clang libicu-dev wget https://swift.org/builds/swift-3.0-release/ubuntu1404/swift-3.0-RELEASE/swift-3.0-RELEASE-ubuntu14.04.tar.gz

tar -xvf xxx.tar.gz

export PATH=~/swift-3.0-RELEASE-ubuntu14.04/usr/bin

Compile & Run

swiftc helloworld.swift ls -al ./helloworld

The Future…And maybe some of the present

Server-side Swift• REST

• JSON

• Cookies

• Database connectors

• Web Servers

• Templates

And there’s more…

• Vapor - RoR for Swift

• Kitura - IBM

Tools, tools, tools

• Package Manager

• swiftenv

• http servers, markdown parsers, connectors…

The Future…Maybe

In Theory…

• Leverage NDK

• Generate an object file from the LLVM-IR

• Package that object file in an Android app (Likely C)

• Pack in a Shared Library and run

• The future…? (Search if you really want to)

Swift for Windows

• github.com/tinysun212/swift-windows

• swiftforwindows.codeplex.com

• Microsoft Visual C++ and Cygwin binaries

• No UI or platform libraries (yet)

Score Card+ Type, generics, optionals, chaining, Protocol-oriented

+ Simple(ish) and clean(ish)

+ Memory management

+ Big backer

- Support (Docs, Tools)

- Fast development*

- www.linkedin.com/pulse/who-said-swift-better-than-objective-c-willie-shi

Yet to come

• Even more stable ABI

• Platform independence

• Better C++ compatibility

• General stability

• Concurrency

Thanks!Chris Ward @chrischinch Contentfulgregariousmammal.com

I have stickers and merchandise!