4 ms·
Swift compared to Python was getting way too complex. Why would anyone learn Swift for data science when Python will do?
by msie 6y ago
Swift compared to Python was getting way too complex. Why would anyone learn Swift for data science when Python will do?
- jtdev 6y agoAgreed, Swift has an obsession with functional programming that is just so off-putting to me and I suspect many others.
- jshier 6y agoThis is hilariously wrong. Actual fans of functional programming would disagree with you, as there are several things Swift doesn't do to enable pure functional programming.
- astrange 6y agoThe type system is kind of sort of vaguely ML/Haskell-like despite looking like C. Is that what you mean? It certainly isn't a functional programming language. It's intentionally imperative.
- jtdev 6y agoYes, Swift is fundamentally imperative... but it has functional concepts littered throughout in ways that are obtuse, unhelpful, and unavoidable.
- geophile 6y agoI am not involved in data science at all, I have extensive Python experience, and did some work in Swift for a couple of years. Putting aside the Python 2/3 transition, I think that Python does a good job of introducing new features carefully. For example, the "X if P else Y" syntax. While I prefer the C approach, the Python approach works fine and fits in the language well. I had a mild dislike of Swift from the beginning, but it was a lot more palatable than working in Objective C. What bothered me was all the gimmicky syntax. Sometimes "let" unwraps an optional, sometimes it doesn't. ! and ? seem badly overused. ARC doesn't compose well with other language features. There is a ton of syntax whose only purpose appears to be to stuff logic into and around assignment syntax. Then it got worse, with major language changes across versions 3-5, each one introducing lots of new concepts and syntax. And of course, Swift is a proprietary Apple language, (in the same way that C# is tied to Microsoft). When I stopped doing iOS programming, I very happily but Swift behind me. I saw the TensorFlow additions to the language and thought the whole thing bizarre. I put my reaction down to my lack of involvement with data science. Maybe I'd appreciate those changes more if I knew more about data science. But I also remember thinking that it was quite odd to make such extensive additions to the language to support this one application area, which was very, very far from the language's sweet spot.
- smabie 6y agoI mean, python doesn't do it very well at all. that's not say I would use Swift, but I'd choose Julia any day over Python.