HACKER Q&A
📣 solardev

Learning Swift as an Existing Programmer?


It's been a while since I've had to learn a new language & stack from scratch. What are some good resources for learning Swift as an existing developer? There are a ton of courses online for non-programmers, but I don't want to learn what a print statement or conditional is. Instead, I want to learn how modern UI toolkits are used, how network calls are handled, best practices for async, multi-threading, error handling, etc. Real business logic stuff. Are there any courses like that, free or paid?

I'm a web dev, mostly frontend, who just wants to make a macOS desktop app for fun. I know most of app development is on iOS these days, but I don't particularly like that platform and would rather focus on the desktop, if there's a difference. I've previously learned React, JS, PHP, Perl, and Visual Basic.

Not really interested in React Native or other similar JS-to-native frameworks. I want to make a lean, fast, simple and unbloated app with native look & feel.


  👤 Someone Accepted Answer ✓
https://developer.apple.com/swift/, then https://developer.apple.com/swift/resources/

That covers the language and the standard library. With your experience, reading that language ‘spec’ shouldn’t take more than a day (I think it’s a bit too loose to call it a spec, but that makes for a quicker read. It also may be that it is covering all edge cases, but so well written that it doesn’t look that way gedijt: just noticed there’s a “language reference” section now. IMO, that makes this (closer to) a spec)

As with most languages, getting a grip of the standard library, and learning to use it well will take more time.


👤 calebjosue
If you can afford the time, this resource is a good one (Free). https://cs193p.sites.stanford.edu/2023 (The videos are available on YouTube in their official channel). You can skip through the basics (The ones related with printing 'Hello World', etc).

There's also this course on Udacity (https://www.udacity.com/course/ios-developer-nanodegree--nd0...), in which you are exposed to some APIs (To use them) almost to the end (Since you have mentioned being interested in the networking capabilities available).

Hope that helps!


👤 stray
This is really meant for learning Swift for iOS, but most of it is useful for macOS as well: https://www.kodeco.com/ios/paths/learn

It's not expensive, nor is it free. Good stuff.


👤 behnamoh
Step 1: Learn Python.