
Swift 5: start your engines - mpweiher
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170807/038645.html
======
protomyth
One of the problems I find with Swift is that Apple doesn't go back and
properly update their sample code at developer.apple.com. They have examples
that will not build. If you search you can find folks that have patch sets,
but they really need to fix the examples.

~~~
melling
I don't think that matters. The iOS Swift community is large enough that
there's lots of example code. I've got almost 7000 urls in my database of
Swift blogs:

[http://www.h4labs.com/dev/ios/swift.html?age=90](http://www.h4labs.com/dev/ios/swift.html?age=90)
\- Last 90 days

Take a look at a weekly view:
[http://www.h4labs.com/dev/ios/swift.html?week=0](http://www.h4labs.com/dev/ios/swift.html?week=0)

Most topics get sufficient coverage. If you don't mind paying a small monthly
fee, Ray Wenderlich's site has lots of tutorials that are well maintained.
Plenty of free examples too:

[https://www.raywenderlich.com](https://www.raywenderlich.com)

Another pay site that is be useful if you want to come up to speed quickly is
[http://nsscreencast.com](http://nsscreencast.com)

~~~
amrshafik
Great URL's, also a number free iOS app examples and resources on this youtube
channel (Lets Build That App) as well
[https://www.youtube.com/channel/UCuP2vJ6kRutQBfRmdcI92mA](https://www.youtube.com/channel/UCuP2vJ6kRutQBfRmdcI92mA)

~~~
acmecorps
Seconded on Lets Build That App. Found about it last week, and bought the
subscription asap - was impressed with the quality.

However, I was an iOS dev 3-4 years ago and wanted to learn swift - so, it was
a pretty smooth upgrade for me. I think whoever wants to learn iOS dev might
be better off learn the basics more thoroughly and then come back to this
course.

------
ssijak
And just today I was contemplating writing my first native iOS and macOS
app... I was looking at the options and decided to go native with Swift. I
have never written Objective-C app and never used x-code for dev. But I have
~10 years of dev experience, mostly Java and Python on the backend and front
end dev exp mostly with Angular. Some Android, and a little from
<input_random_tech_here> because I like to experiment.

So, my question is. How hard and enjoyable is for someone like me to write not
very complex native iOS/macOS app in Swift starting from scratch? Best
resource to start with?

~~~
bsaul
Hardest part isn't the language. Swift is among the best languages you can get
today. IOS sdk, on the other hand, has become a bit of a mess, due largely to
the pace at which the field is moving ( although not as bad as android).

Stanford courses are the best you can find online for free.
[https://youtu.be/HitSIzPM_6E](https://youtu.be/HitSIzPM_6E)

~~~
jswizzy
I concur. The Android SDK seems to violate SOLID principles and fails to
capitalize on OOP at all.

~~~
trevor-e
The Android framework is honestly a huge pain to develop with. I switched over
to iOS development a year ago and am much happier. It feels almost impossible
to get Activity/Fragment life cycles correct for simple things. And anything
View related has to pass around a God Context object.

------
ainar-g
Maybe someone will explain this to me. Does Swift use this confusing "rapid
release" versioning? Does Swift 4 break backwards compatibility with Swift 3?

In my company people are looking for a language to rewrite some legacy
Objective-C to. Swift is often discarded as "unstable" because of these major
version bumps. Compare this to Go, which, seven or so years after the initial
release is still 1.x and still doesn't break code.

I just don't get breaking the language so often. Do people enjoy rewriting
code?

~~~
eridius
Swift 3 was a major backwards-incompatible change. It came with an automatic
migration tool, but the tool only kind of worked.

Swift 4 is a much smaller change. There are backwards-incompatible standard
library changes, but not on the scope of Swift 3. Again, it comes with an
automatic migration tool. I haven't tried it myself, but I'm optimistic that
it will work much better, both because they've had a year to fix what went
wrong the first time, and because the changes are much much smaller.

But Xcode 9 also supports Swift 3.2, which is the same language as Swift 3.1
with some miscellaneous bugs fixed and with the iOS 11 / macOS High Sierra
SDKs. Your Swift 3.1 code will likely run under Swift 3.2 with no changes, and
any changes that are necessary are going to be strictly due to SDK changes
rather than language changes.

Xcode 9 also supports mixing Swift 3.2 and Swift 4 modules. You can have your
application written in Swift 3.2 and use a library written in Swift 4, or vice
versa. This means you have a full year to migrate to Swift 4 (since I assume
Xcode 10 will drop Swift 3.2 support, though this is pure speculation).

~~~
randyrand
My biggest issue would be compiled libaries. I come from c++ so updating and
recompiling all the libs would be a huge pain. How is it in Swift?

~~~
eridius
The major goal of Swift 5 is ABI stability. Until then, libraries written in
Swift do have to be recompiled with each new version of the compiler.

------
__sr__
I wish more effort were being made to make it a first class citizen on non-
Apple platforms. With the popularity it has enjoyed, it could easily challenge
the likes of Go, Python or even Java for server side programming.

~~~
brian_herman
[https://github.com/vapor/vapor](https://github.com/vapor/vapor)

~~~
craigching
With a name like 'vapor', I thought this was some sort of joke. But this looks
like fun! [https://vapor.codes](https://vapor.codes). An example from that
page:

    
    
      import Vapor
      
      let drop = try Droplet()
      
      drop.get("hello") { req in
          return "Hello, world."
      }
      
      try drop.run()

~~~
aplummer
Hey, I'm using Vapor (in production). It's really great to work with and
moving fast - feels like the early days of rails. There's a real technical
advantage to having the brevity of swift (like ruby) but with the type
checking of the compiler. I actually migrated this app from Node.js and it's
faster and easier in almost every way (notably lack of 3rd party libraries).

------
jswny
Can someone with Swift experience comment on the status of Swift on non-Apple
platforms? Is it being used outside of the Apple ecosystem? How is the
tooling, deployment, availability/support, etc.

~~~
crb002
Victim of trying it the first week it came out, having to call down into C for
anything POSIX, and giving up. If you don't have POSIX bindings, don't call
yourself v 1.0.

~~~
saagarjha
What exactly do you mean "call down into C"? You should be able to call C
functions directly from Swift, albeit with UnsafePointer and the like.

~~~
ainar-g
I assume, they mean that you don't need to have C at all. See how Go for
example doesn't require C on most platforms to make syscalls (IIRC, the
exceptions are Windows and Solaris).

~~~
saagarjha
So, based on this[1] they've just wrapped the calls with their own…not sure if
there are any real benefits here.

[1]:
[https://golang.org/src/syscall/syscall_linux.go](https://golang.org/src/syscall/syscall_linux.go)

------
tambourine_man
Since things at Tesla haven't worked out, I hope Lattner eventually returns to
Apple.

Not that the Swift team is in a bad shape without him, it's just that it's
nice to have an amazingly smart guy behind an open source language that many
of us use (and that number that will probably only grow).

~~~
lyinsteve
There are tons of amazingly-smart people working on Swift at Apple right now

------
jorgemf
Swift developers, how is the evolution of the programming language now? does
it still have backwards compatibility issues or things are more stable now
(and will be with this new proposals)?

~~~
saagarjha
The Swift 3->4 migration was not bad, actually–just a couple of small changes
to source here and there. With ABI stability I think we'll see the adoption of
Swift for libraries and frameworks increase significantly.

------
bsaul
About concurrency : does anyone know of a language that would let you tag
portions of a codebase in some way, and declare something like "all those
methods should execute in the same thread". Those declarations would then be
checked by the compiler.

That would be a first step toward agent like concurrency, but it would be
general enough to apply to other types of concurrency models.

~~~
whowouldathunk
Ugh, makes me think of COM

[https://msdn.microsoft.com/en-
us/library/windows/desktop/ms6...](https://msdn.microsoft.com/en-
us/library/windows/desktop/ms680112\(v=vs.85\).aspx)

~~~
int_19h
This is different. COM apartments were a _runtime_ mechanism to magically
_make_ the code to run on a single thread (or on multiple but specific threads
for MTA), by introducing object proxies that "transparently" marshaled calls.

------
Jack4E4B
Concurrency finally, it has taken forever. Is there any built-in support now?
Server side Swift is lacking this big time.

~~~
slavapestov
It doesn't cover everything, but libdispatch is available on both Darwin and
Linux, with a "Swift-ified" API.

~~~
Jack4E4B
I am not a Swift expert, can you explain your point. How would that situation
compare to say programming in Go where there is built-in support for channels,
and concurrency?

------
real-hacker
The only complaint about swift programming is: they keep changing the
programming interfaces, so if I import a third-party code file written with
earlier versions of Swift, I have to go through the errors of 'obsolete APIs',
updating the function signatures. The changes are automated by Xcode, but it
is still a hassle.

I am totally OK with introducing new features of Swift language. But changing
the API function signatures (even multiple times) seems totally unnecessary,
and reflects the API designers' obsession of naming conventions.

------
martijn_himself
Tangential question- I'm in the UK and I am keen to become a iOS developer
(I'm currently a senior .NET developer in a large firm). Are there enough
opportunities remaining in iOS development as a contractor / creator of
('enterprise') apps to make a living? I would be very grateful if anyone could
share any advice / personal experience.

------
geodel
> the Core Team felt that we could strike a balance with not diluting
> attention from ABI stability while still enabling a broader range of
> proposals compared to Swift 4 by __requiring that all proposals have an
> implementation __before they are officially reviewed by the Core Team.

Good. They are effectively saying 'Talk is cheap, show me the code'

------
the_common_man
Great to see chris still contributing -
[https://lists.swift.org/pipermail/swift-evolution/Week-of-
Mo...](https://lists.swift.org/pipermail/swift-evolution/Week-of-
Mon-20170807/038662.html)

------
seekler
Anyone else doing what swift will do: Inlines the standard library, but
distributes it separately. Does not makes sense to me at all.

------
apple4ever
I'm sticking with Objective-C. A much better language than Swift, even at
version 5.

------
legulere
Fixing the ABI might be interesting for interoperation with other programming
languages

------
RocketSyntax
I'd rather build hybrid apps. Fix your IDE.

