7 ms·
What's New in Swift 4
- melling 9y agoSwift has evolved quickly, and it has finally been large adopted by the iOS community: https://www.tiobe.com/tiobe-index/ 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.
- mozumder 9y agoHow 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?
- jrs95 9y agoWindows isn't supported at all
- ash_gti 9y agoIts 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 https://github.com/swift-server/work-group
- dvfjsdhgfv 9y agoYes, 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?
- ash_gti 9y agoI'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.
- dave84 9y agoSame reason a JavaScript developer uses Node.
- proyb 9y agoSome 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.
- Someone 9y agoI 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/ 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)
- virmundi 9y agoSomething 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.
- nipplesurvey 9y agoare you referring to the lifecycle events like onResume and onPause? You can approximate those with iOS using a combination of viewWillAppear and UIApplicationWillEnterForegroundNotification
- virmundi 9y agoI 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.
- binaryapparatus 9y agoI really tried couple of times to use swift in production. One of my MAS apps is pure swift. However I can't force myself to like it. Maybe I am missing some brilliant part of it that I missed but I just can't love it.
- fhood 9y agoI haven't used it since the early days, and at the time it seemed obtuse and was also missing a lot of really basic features. I might pick it up again and see how it has changed.
- swah 9y agoWhat do you love? I can't love Go as a language, but love the projects, standard library, community, and have no replacement yet for the space where Go is.
- binaryapparatus 9y agoI went trough C and Pascal some 30 years ago and still prefer C above anything else. Objective C obviously being close enough so I can write efficient (or at least visually pleasing code). Last straw with Swift for me was banishing of ++ operator. C has beauty and smartness to write _a lot_ of code in one line. I don't like C++ that much. Anything that makes code beautiful works for me. Swift somehow can't be per_line_efficient and aesthetically pleasing to me.
- melling 9y agoSounds like you like what you’re used to. What do you mean by per line efficient? C and Objective C are more verbose. Declaring non-null, implicit types, and immutable in Swift is a big plus. let x = “Hello world” var isDone = false Filtering an array in one line is much nicer than a for loop: let newList = anArray.filter(...) No header files reduces code significantly.
- binaryapparatus 9y ago
- euyyn 9y ago> Swift 4 is the release that says, “We need to stabilize the source code.” Stabilizing source code doesn't have any meaning that I know of. But the updates to the language and library are good! Looking forward to what they come up with regarding ownership semantics.
- deleted 9y ago[deleted]
- agumonkey 9y agosince they're keen on intervals I wonder if they'll provide interval algebra if a..b ∩ ..<c: