News for hackers. Stuff that matters.
Re:Swift Algorithms by typon on Thursday October 08, 2020 @12:18AM (#24715746)
Is Swift worth learning if you're not going to be doing Apple development?
Re:Swift Algorithms by austinl on Thursday October 08, 2020 @01:46AM (#24716226)
As an iOS engineer, I'm a bit biased, but I'd still say it's currently not practical to learn it if you're not doing Apple development.

That said, I love the language, and it's a big part of what motivates me to continue being an iOS engineer (I'm not sure I'd still be at if we had kept on with Objective-C).

I would love to see server-side Swift take off, but the ecosystem is still fairly new, so any large project would require you to roll your own solutions more often that you would need to in other languages. I was also excited to see https://www.tensorflow.org/swift — Swift being used for ML. Swift is working on support for differential programming, which is a cool development in the space. More info here: https://github.com/apple/swift/blob/main/docs/Differentiable...

Perhaps eventually there will be enough applications outside of the Apple ecosystem to reach a critical mass.

Re:Swift Algorithms by madeofpalk on Thursday October 08, 2020 @07:04AM (#24717949)
I can't really see a reason to use Swift if you're not targeting Apple platforms.

I think between Nodejs, Python, Go, (and maybe Rust), I can't really see much of a compelling usecase for Swift on the server. Even if you're developing a server component for an iOS app, I don't think it really is all that common to share a core between the two.

Re:Swift Algorithms by zepto on Thursday October 08, 2020 @04:31PM (#24723600)
Swift is faster than all three of those. Vapor is now a very elegant framework, and very easy to use if you already know swift.

I agree that it’s not a language to adopt yet if you don’t also target apple platforms. Primarily I disagree with you about it not being good if you are developing a server component for an iOS app.

Re:Swift Algorithms by moksly on Thursday October 08, 2020 @02:16AM (#24716392)
As a developer in non-tech enterprise, my biggest dream is probably swift being capable of targeting web and android.

We don’t have the resources to currently target all three platforms, and we don’t have much hope for google frameworks as they tend to be changed/abandoned faster than we can afford to adopt them, and we can’t really rely on Facebook tech too much because of corporate ethics (I know it don’t make much sense, but it’s non-tech enterprise, this is probably the least weird ethics rule).

I mean, it doesn’t really have to be swift, it could be python, .net or kotlin, for all I care, but it’s probably more likely to be swift.

Re:Swift Algorithms by pjmlp on Thursday October 08, 2020 @02:44AM (#24716519)
Then try to see how much of it is possible as mobile Web, specially if it is just a CRUD application at heart.

Android's NDK is quite limited, its main purpose is to implement native methods for Android Java/Kotlin, outside games, there is very little you can achieve without going through JNI or Android IPC into Java land.

Re:Swift Algorithms by bee_rider on Thursday October 08, 2020 @04:00AM (#24716958)
That github differentiable programming link was an interesting read. It reminded me of interval arithmetic in the same sort of "But wait, why can't we just jam math into this program" vibe. Very neat.
Re:Swift Algorithms by rudedogg on Thursday October 08, 2020 @12:38AM (#24715864)
I've been using Swift for over 5 years now I think.. and I would say no. Outside of the Apple ecosystem the only thing that is really of interest right now is Vapor.

It's a nice language though. I worry it's getting too complex, but the new features enable SwiftUI to work so I can't complain too much.

Re:Swift Algorithms by pjmlp on Thursday October 08, 2020 @02:38AM (#24716485)
Only if you are a language geek, and want to open you mind that C and C++ aren't the only game in town for systems programming.

Other than that, outside Apple platforms is still in a worse state than clang Objective-C + GNUStep.

Re:Swift Algorithms by xenihn on Thursday October 08, 2020 @12:53AM (#24715959)
No IMO, but Apple (iOS, macOS not so much) development is still an incredibly lucrative niche, and will continue to be so until the United States collapses. It might even still be useful after that.