News for hackers. Stuff that matters.
Re:What's New in Swift 4 by melling on Thursday September 28, 2017 @02:46PM (#15359743)
Swift has evolved quickly, and it has finally been large adopted by the iOS community:

https://www.tiobe.com/tiobe-index/

What’s missing is non-Apple adoption. I’m hoping Swift becomes an acceptable/competive option on other platforms.

Re:What's New in Swift 4 by mozumder on Thursday September 28, 2017 @02:52PM (#15359782)
How easy is it to build a Swift app that uses the same codebase for Mac, Windows, and Android?

What are the target environments like in non-Apple systems?

Re:What's New in Swift 4 by ash_gti on Thursday September 28, 2017 @02:55PM (#15359797)
Its not terribly difficult to use swift on linux, theres a a working group trying make it easier for developers to use swift on the server [0]

[0] https://github.com/swift-server/work-group

Re:What's New in Swift 4 by dvfjsdhgfv on Thursday September 28, 2017 @03:59PM (#15360233)
Yes, but the main question is: what for? You can't use it even to do what it's been created for: writing iOS apps (maybe some backend modules if you're obstinate enough). There is a great choice of languages in Linux with rich libraries and vibrant communities - why on Earth should I choose Swift?
Re:What's New in Swift 4 by ash_gti on Thursday September 28, 2017 @04:50PM (#15360603)
I'm an iOS developer and I use it for writing iOS apps, testing, and managing my test environments. I have the luxury of assuming a macOS host though.

I think the reason you'd pick it for a server language is because the strengths of the language and ecosystem meet your server requirements.

Re:What's New in Swift 4 by Someone on Friday September 29, 2017 @08:57AM (#15364787)
I agree that it currently isn’t the most productive choice for most, but Swift wasn’t created just for writing iOS apps (at the least, it targeted desktops, too, from the start), and certainly aims much wider today. https://swift.org/about/:

”The goal of the Swift project is to create the best available language for uses ranging from systems programming, to mobile and desktop apps, scaling up to cloud services”

And if “doesn’t have rich libraries and vibrant communities” were a decisive argument to not start using a new language, there never would be a new language again. I can see that, for some, using Swift on the server could be the right choice (for example because it makes it easier to share code between server and iOS apps)

Re:What's New in Swift 4 by proyb on Friday September 29, 2017 @12:45AM (#15362757)
Some developers use Rust for Linux libraries, I use Swift for web server on Linux. The only concern I have is working with Linux libraries can be fairly difficult as you get in Rust.
Re:What's New in Swift 4 by dave84 on Thursday September 28, 2017 @05:28PM (#15360885)
Same reason a JavaScript developer uses Node.
Re:What's New in Swift 4 by virmundi on Thursday September 28, 2017 @03:05PM (#15359866)
Something you'd have to consider is that Android has a screen/app lifecycle that Apple products don't. If you're working with ionic, you have to care about this. What ever swift library you use, it has to make these lifecycle concepts available to you.
Re:What's New in Swift 4 by nipplesurvey on Thursday September 28, 2017 @03:23PM (#15359983)
are you referring to the lifecycle events like onResume and onPause? You can approximate those with iOS using a combination of viewWillAppear and UIApplicationWillEnterForegroundNotification
Re:What's New in Swift 4 by virmundi on Thursday September 28, 2017 @03:45PM (#15360134)
I am referring to those. If someone just tries to make Swift the platform, I think they will have to put as much thought into their tooling as xamarin, cordova, etc.
Re:What's New in Swift 4 by jrs95 on Thursday September 28, 2017 @02:54PM (#15359789)
Windows isn't supported at all