11 ms·
Is anyone using Swift outside of Apple specific stuff professionally? When they first announced swift it felt like it might catch on as general purpose gced lan
by ilovecaching 8y ago
Is anyone using Swift outside of Apple specific stuff professionally? When they first announced swift it felt like it might catch on as general purpose gced language. The language itself is quite beautiful in a lot of ways (although being OO was obviously an awful step backwards). But it feels like it's still just the crazy language Apple uses, just like Objective-C was.
- sooheon 8y agoJeremy Howard and Chris Lattner are starting to push Swift for Tensorflow: - https://www.github.com/tensorflow/swift https://www.github.com/tensorflow/swift - https://www.fast.ai/2019/03/06/fastai-swift/ https://www.fast.ai/2019/03/06/fastai-swift/
- pjmlp 8y agoThey must push it really well for it to ever be considered an alternative to Julia, ML.NET, Python/C++, Deeplearning4j on Windows.
- bbrian 8y agoGoogle are beginning to use it for Tensorflow: https://www.youtube.com/watch?v=s65BigoMV_I https://www.youtube.com/watch?v=s65BigoMV_I There's a course currently running in University of San Francisco run by Fast.ai which is using Swift-Tensorflow taught by Chris Lattner for two lessons: https://www.usfca.edu/data-institute/certificates/deep-learning-part-two https://www.usfca.edu/data-institute/certificates/deep-learn... Not exactly what you asked, but pertinent.
- ilovecaching 8y agoI don't expect that will do very well. ML is already crowded, and Python is already solidly at the top. Having worked in ML myself, no one would switch if it meant dealing with a real statically typed language they could hack away at easily in a repl or jupyter notebooks, or access mypy, numpy, scikit, etc. ML is an ecosystem of tools that are all in Python currently.
- jimmy_dean 8y agoJust a side-note. Swift comes with an repl and has support in Jupyter and Google Colab for whatever that's worth. As you mentioned the numerical computing ecosystem is just not anywhere close to Python or even Julia. There is a silver lining in that Swift has pretty decent Python interoperability.
- orbifold 8y agoIn Swift you can just write import Python var np = Python.import(“numpy”) And can then use numpy as you would normally. Same goes for plotting.
- eridius 8y agoUnless you consider reference counting to be a form of GC¹, Swift is not a GC'ed language. ¹It technically is, but most people don't mean reference counting when they say GC.
- pjmlp 8y agoIt doesn't matter what people think, rather CS definition. Software Engineering is not about what people think, rather what is technically correct.
- arebours 8y agoWell.. what is technically correct depends on a definition. And there are customary/practical definitions too. And sometimes definitions are tainted by context, like in "is this gc or ref counting language".
- pjmlp 8y agoWhich should be "is this tracing GC or ref counting language". Naturally when in some juriditions one is allowed to call themselves engineers after a 6 months bootcamp we land in such customary/practical definitions.
- eridius 8y agoIt certainly does matter because the question is what did the grandparent mean.
- phamilton 8y agoWe've been eye-ing it for a while at remind.com. Our hangup has been that we're heavily aws focused, but https://github.com/amzn/smoke-aws https://github.com/amzn/smoke-aws is looking promising. We're interested because it's one of a handful of statically typed functional programming languages. Haskell/Ocaml are great as ML type languages, but it's a big paradigm shift for a team to jump into. Rust still has a pretty decent learning curve. Swift seems to have landed nicely in the "anyone can pick it up" territory. Kotlin is also in that territory, but the JVM is a beast. For now, we're heavily focused on Typescript as the statically typed functional language, and we leverage types pretty aggressively (conditional types, discriminant unions, etc). Our iOS devs bring a lot of the Swift style over to our backend Typescript systems and from what I've experienced I think Swift absolutely will have a place in backend development.
- cageface 8y agoSwift is a nice language but I think the reliance on ref counting is going to limit its adoption. You have to work a lot harder to avoid reference cycles in Swift than you do in a garbage collected language. Unless GC latency is a deal breaker for your problem domain it’s not worth the extra effort. My money is on Rust for really low level stuff and Kotlin for anything where JVM overhead is acceptable.
- saagarjha 8y agoIt really depends on what you're doing. A lot of the time, neither garbage collection pauses nor reference cycles are an issue; and when they are it's typical that one or the other will solve the issue.
- cageface 8y agoIf GC pauses aren't an issue for your app then you're better off with a full-blown GC because it's a lot easier to code for. Reference counting, as used in Swift, forces you to think a lot about cases where you might be creating reference cycles and memory leaks. GCs can figure this out for you and take that burden off the programmer.
- deleted 8y ago[deleted]
- peferron 8y agoSibling comments mention Chris Lattner. For readers that might not know him, he's the main inventor of Swift. Him pushing Swift should not necessarily be taken as a sign of general community enthusiasm. I would love to see more Swift on the backend. It's surprisingly hard to find a language that's concise, expressive, statically typed, and easily accessible to beginners. Swift checks all these boxes. That being said, it's much easier to succeed on the front-end when the only competitor is Objective-C (see: JavaScript), than on the backend when the competitors are Go, Rust, Elixir, Python, Node, C++, Java and more, all with large ecosystems already in place. Swift may succeed in a niche, and "Swift for TensorFlow" appears to be an attempt at that, but I don't think it will become ubiquitous (call it traditional HN negativity).
- Razengan 8y agoFor me, it's the best language for game development that I've seen ever since I wanted to make my own games as a kid.
- ta7775466 8y agoThey'll need to do an awful lot more on their IDE for that to happen. That GUI drag'n'drop onto code... ugh.
- accatyyc 8y agoThat's just a convenience thing. I've worked in Xcode for nearly 10 years and I never use that feature. Good feature for teaching though. But if you hate it, just don't use it.