3 ms·
If you have tons of Swift code that needs to run in watchOS, iOS, iPadOS AND the cloud, this would kinda make sense... but how frequently is that the case? Whe
by mikece 6y ago
If you have tons of Swift code that needs to run in watchOS, iOS, iPadOS AND the cloud, this would kinda make sense... but how frequently is that the case? When I was still doing mobile the goal was to write as LITTLE client-side code as possible and put as much logic/heavy lifting on the API side as possible because we can make changes there far quicker than in the native client. And almost all of the client-side code was about GET/POSTing to the API or interacting with the SDK to draw things on the screen -- almost no business logic. That said, I didn't work much on apps that were supposed to work without a data connection for long periods of time... in that case it's more likely you'll run into scenarios where you're writing business logic in the app (in Swift/ObjC) but even then the goal was to keep that kind of code to a minimum (or less).
- phaedryx 6y agoI can think of a few scenarios off of the top of my head: App sends an event, Lambda sorts it into queue(s) for processing App wants to know if its data is stale, asks Lambda I think there is a niche for small, quick processing. Why write it in Node or whatever if your devs already know Swift?
- Eric_WVGG 6y agoApple’s goal for Swift is to be "the new default language for computer science." They see it as supplanting Java. Whether you think that's crazy or not, pure server Swift is a thing, personally I love it. https://vapor.codes https://vapor.codes
- j88439h84 6y agoJava is the default language for computer science??
- panzi 6y agoAt many universities it's the language they teach and have most of their exercises in. The exercises that are explicitly about something else excluded. Functional programming -> Haskell, logic oriented programming -> Prolog, statistics -> R, writing compilers -> C with flex/yacc/bison etc. Everything else: Java. At least it was like that for me when I studied in the '00s and '10s in Vienna.
- aryonoco 6y agoJava? Where I am, the language of computer science is, and has been for the last 5 years or so, Python. I rarely see Java outside enterprise applications anymore (and Android, though it's being supplanted by Kotlin there). Java is the new COBOL.
- pjmlp 6y agoApple's goal for Swift is quite clear on its documentation, to replace C and Objective-C. As for anything else it isn't quite clear.
- Eric_WVGG 6y ago> 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. https://swift.org/about/ https://swift.org/about/ > "My goal for Swift has always been, and still is, total world domination," Chris Lattner, the creator of Swift, said onstage at Apple's Worldwide Developers Conference in 2017. https://www.businessinsider.com/developers-love-swift-apple-programming-language-ios-apps-2020-3 https://www.businessinsider.com/developers-love-swift-apple-... I'm having trouble finding the specific bit about "default language for computer science," might have been his interview on the ATP podcast. anyway
- pjmlp 6y agoWhat Chris Lattner might desire and what Apple wants isn't the same thing, specially since nowadays he doesn't get much to say on where Swift goes. Had he stayed at Apple overseeing the language design I would agree.
- jmull 6y agoSwift is a nice language in its own right, and, according to the post, is a good fit for the lambda environments. So there doesn’t need to be a direct connection to iOS to decide to use Swift for serverless function. A developer might just decide to use Swift for serverless functions. (I can see the benefit to sharing certain kinds of code between client and server, but a lot of things have to line of for this to make sense, so I’m not sure if that’s a significant driver.)
- CalmStorm 6y agoSwift does not allow null pointer, and therefore there is no null pointer exception. This is a very nice feature, especially compared with other server-side compiled languages like Golang and Java. Swift is modern and concise, I hope it takes off on server-side.