4 ms·
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 pro
by adriansky 7y 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.
- alexgaribay 7y agoSwift 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 https://swift.org/about/#platform-support
- derefr 7y agoI 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.
- oldmanhorton 7y agoFor 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)
- noodlesUK 7y agoThese 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.
- gumby 7y agoThat's true of most languages, like C++, rust, etc.
- gumby 7y 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.
- bound008 7y agoYou 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)
- xkemp 7y agoThere's some momentum behind Swift-on-Server, I believe. And Tensorflow Swift seems to be a rather serious project.
- melling 7y agoThe 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 https://github.com/melling/SwiftCookBook Trying to be more functional with my Swift: https://github.com/melling/SwiftCookBook/blob/master/functional.md 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 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.
- odysseus 7y agoDoes the app sync between different macOS computers though? My experience has been: no. Both computers are signed into the same Apple ID ...
- melling 7y agoIt’s using iCloud. Basically, they work in the same directory. Before I had to copy and paste into Xcode Playgrounds.
- odysseus 7y agoThanks. 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.
- jayrhynas 7y agoQuick note about your functional examples - there's already a built-in version of `take` called `prefix` available on all Sequence types.
- melling 7y agoThanks. There’s also a prefix(while:) that appears to be takeWhile(), which I also needed. https://developer.apple.com/documentation/swift/sequence/3128810-prefix https://developer.apple.com/documentation/swift/sequence/312...
- Grustaf 7y agoOn the other hand there are quite a few ios devices out there...
- secretsatan 7y agoMore 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.