top | item 22301735

(no title)

adriansky | 6 years ago

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.

discuss

order

melling|6 years ago

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.

jayrhynas|6 years ago

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

odysseus|6 years ago

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

gumby|6 years ago

> 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.

alexgaribay|6 years ago

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

derefr|6 years ago

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.

xkemp|6 years ago

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

bound008|6 years ago

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)

Grustaf|6 years ago

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

secretsatan|6 years ago

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.