5 ms·
How’s this language doing? Any big projects on Swift in the last years?
by kensai 4y ago
How’s this language doing? Any big projects on Swift in the last years?
- speeder 4y agoThe company I work for uses Swift a lot... that said, the performance sensitive parts of the code is still Cpp. Swift is nifty but still not Cpp I guess.
- asadlionpk 4y agoHow does it compare performance wise to cpp in real-life.
- Teknoman117 4y agoIs the company you work for mostly targeting Apple devices? I'd be interested to hear if there is any large scale Swift usage outside of the Apple ecosystem. If you are targeting Apple devices, was your performance sensitive code always written in Cpp or did you leave Objective-C for Swift+Cpp? Or, were the Cpp parts inherited and just wrapped with whatever your platform's encouraged language was? (I used to do contract iOS work but I stopped around the time Swift came out due to taking a rewarding full-time job, so I never really spent much time on Swift beyond "huh, neat")
- machinekob 4y agoStill macOS language, a lot of cool features but not enough community on linux and for sure windows :/
- andrewbarba 4y agoThis is a shameless plug, but I built Swift Cloud to help people build scalable backends in Swift: https://swift.cloud https://swift.cloud Behind the scenes we compile Swift to WASM and deploy to Fastly's edge network, Compute@Edge. At my day job we are using this in production and serving thousands of requests per second on our Swift app. Overall it's a lot of fun to deploy Swift on server, but the developer UX still leaves a lot to be desired. Running and testing locally is still non-trivial.
- pradn 4y agoThis looks great, good work! One tangential question: do you worry about using "Swift", which I assume is an Apple trademark, in the name of your product?
- andrewbarba 4y agoThanks so much. And short answer - Yes. My guess is it's a matter of 'when' I have to deal with this. I've had the domain for a while, and this is something I've wanted to build for such a long time. Things fell into place when I was able to build a Swift SDK for Fastly's platform back in January this year. The stubborn engineer in me went ahead and used the domain anyway and launched what you see today.
- pradn 4y agoGotcha, thanks for your answer :)
- danudey 4y agoI have no use for this project, but this seems super cool!
- sudoit 4y agoI already created an account! I’m definitely going to use this the next time I need a little cloud function
- andrewbarba 4y agoLove to hear that! Always feel free to reach out if you have any questions or run into issues.
- aaaaaaaaaaab 4y agoAFAIK most people have been moving away from it in favor of Rust and Zig. A lot of friends at FAANGs are still working in ObjC codebases, and probably gonna skip the whole Swift story by jumping straight to Rust when the time comes. But of course this could be just in my bubble...
- tambourine_man 4y agoIf you mean anything other than iOS apps, sure. But for this latter case, there’s no real alternative. An iOS app in Zig or Rust is in an extremely small niche.
- liuliu 4y agoWould be interesting to know the "moving away from Swift to Rust / Zig" story. My impression is that Swift not even in consideration in most projects with Rust / Zig.
- hot_gril 4y agoI can see some performance-sensitive projects being done in Swift, Rust, or Golang. Funny, the place I don't like using Swift is its main use case, high-level iPhone apps. It's overkill. The complex Stackoverflow answers for "how to do (simple thing like getting a substring) in Swift" say so.
- jarjoura 4y agoRust is taking over the tools space for sure, replacing important tools that need to run often and speed is king, replacing tools written in python and perl. Rust is also making its way into new core cross-platform libraries that need speed, instead of C++, however, no one is going to rewrite C++ libraries. No UI or product team is going to use Rust over Swift (or Kotlin) or whatever your stack currently depends on.
- pjmlp 4y agoSwiftUI and Metal look like big projects.
- tubs 4y ago95% of the underlying metal driver is written in cpp.
- pjmlp 4y agoOf course it is C++, that is what IO and Driver Kits use. App developers use the Objective-C and Swift userspace libraries. The newly released header only library for Metal in C++, is a poor man's binding, that wraps the C API of the Objective-C runtime, without the Metal frameworks written in a mix of Swift and Objective-C.
- chunkyguy 4y agoMetal shading language is C++14
- eob 4y agoWe use Swift on the server at Steamship. Our Swift project is a federated database for NLP data (query, training, inference, embeddings — the whole bit) I assume folks are familiar with the downsides of Swift on Linux so I’ll focus on what we like about it: - Fantastic type system - Good language extensibility (we use Swift to build ourselves a framework to develop Steamship more easily) - Good LLVM extensibility - Mostly performant - Compiled All in all, we're very happy with the choice. My biggest gripe is slow build & test times in GitHub actions. If Swift developers are out there and wanting to dig into more systems-style development, I'm happy to chat.
- liuliu 4y agoAssuming you have to do a lot of string processing (for NLP). Do you have any "shortcut" to do that in Swift? The API is thoughtful, but tedious to type, comparing to Python. It would be great if we have some semi-official "shortcut" libraries just for string processing (The recent RegEx literal is a welcome addition, but not enough).
- eob 4y agoThat's a very gentle way to describe the agony of string processing in Swift :-). We have written a few shortcut libraries ourselves, but we actually don't end up writing a great deal of string processing code in practice because most of our operations are expressed in a higher level query language that gets compiled down to lower-level operator implementations (which only get written once). The vast majority of our code (maybe like a lot of systems?) ends up being more about the management of the broader data & processing environment that coordinates everything.
- musicale 4y ago> Mostly performant I assume that means "efficient at runtime" - but by what metrics? CPU time? Memory usage? Power usage? Latency/responsiveness? Throughput? What are you comparing it against? > slow build & test times in GitHub actions What is the cause of this? Is the generated code slow or just the compiler?
- outadoc 4y agoSure, all recent iOS apps
- hot_gril 4y agoNot really, since so many are React Native. Technically still involves Swift, but eh.
- jonas21 4y agoApart from mobile apps? (some of which are among the most widely-used pieces of software in the world)
- wiseowise 4y agoYes, preferably those that run outside of iOS/Mac.