Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looks very nice! It almost made me want to learn Swift.

The only thing is that it's used only on iOS systems. If I'm going to spend the time to learn a new programming language, I'd like to use it everywhere like I do with JS.



The Mac app "syncs" with the iPad app. That's useful!

I'm writing a Swift Cookbook on Github for anyone who's trying to come up to speed on Swift:

https://github.com/melling/SwiftCookBook

Trying to be more functional with my Swift:

https://github.com/melling/SwiftCookBook/blob/master/functio...

I'm also working through Joel Grus' Data Science from Scratch book, but trying to rewrite the examples in Swift. I'm only a few chapters in:

https://github.com/melling/data-science-from-scratch-swift

Things I'm doing sitting on my couch with my iPad on the arm and the book in my lap.


Quick note about your functional examples - there's already a built-in version of `take` called `prefix` available on all Sequence types.


Thanks. There’s also a prefix(while:) that appears to be takeWhile(), which I also needed.

https://developer.apple.com/documentation/swift/sequence/312...


Does the app sync between different macOS computers though? My experience has been: no. Both computers are signed into the same Apple ID ...


It’s using iCloud. Basically, they work in the same directory.

Before I had to copy and paste into Xcode Playgrounds.


Thanks. So, for this to work, I have to enable iCloud Drive on both machines? Looks like it takes quite a long time to upload 375MB playground files to iCloud too.


> The only thing is that it's used only on iOS systems.

It's also used on the macOS, which is kind of the point of this HN posting.

In the magnitude of using a given platform, learning the language is a small part; the APIs and tooling will be a larger effort. If you already know those things for the iOS, the jump to macOS will be less.


Swift can be compiled and run on Linux. It's most prevalent on Apple platforms. It's usefulness outside of the Apple platform is a different topic though.

https://swift.org/about/#platform-support


I suppose Swift is like a CLR language (e.g. C#) in that sense, then? The language itself will run in many places, but most of the library bindings anyone might care about, or want to use the language to get access to, are for platform-specific libraries.


For what it's worth, C# is very usable on both Linux and macos. Anything outside of UI is pretty much fully cross platform at this point (there are even some cross platform ui attempts, but they're not anywhere near as mature as wpf, xaml, winforms, etc)


These days there’s been a lot of movement towards cross platform C#, with .NET core etc. Whilst there isn’t any desktop application support (other than Xamarin), there’s a good ecosystem for ASP.NET.


That's true of most languages, like C++, rust, etc.


There's some momentum behind Swift-on-Server, I believe. And Tensorflow Swift seems to be a rather serious project.


You may just want to learn a touch of swift to experience nifty language features such as optionals. (Unless you have worked with languages that have all of swift's nifty features)


On the other hand there are quite a few ios devices out there...


More than a few, it's quite ridiculous so many devs are sniffy about it. If you can handle cpp, you can handle swift, one of my biggest gripes right now is having to deal with a cross platform cpp solution that just seems to throw out 10 years of progress so they can implement code like they're used too and reimplement built in solutions slower and harder to work with.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: