Live data from Hacker News

Swift for TensorFlow Shuts Down

github.com

81–90 of 432 posts

Re: Swift for TensorFlow Shuts Down

#81
post #29

Swift compared to Python was getting way too complex. Why would anyone learn Swift for data science when Python will do?

I 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.

Re: Swift for TensorFlow Shuts Down

#82
post #27

Earlier quoted context omitted.

> a very niche market of 100% native mobile development I mean, it also works for native desktop development. And is there really an issue with that? Objective-C basically had no reason to exist beyond iOS/Mac programming and at least now we don't have god damn [myString stringByAppendingString:@"another string"].

I suspect that we'll be seeing ObjC for a long time, as the lower-level system language for Apple devices. I know that Apple still uses it for much of their system programming. No idea if that's by choice, or legacy (possibly both). I was looking at the upcoming async/await stuff for Swift, and it's still not comparable to some of the lower-level threading systems. That said, I have not done system programming for a…

We'll see it in legacy code for a long time, sure, but there's every indication that all new Apple frameworks are being written in Swift. Anyone starting a new project in Objective-C is in the minority.

Re: Swift for TensorFlow Shuts Down

#83
post #6

Swift now being a 100% Apple-sponsored & owned project again makes me a bit nervous. Anyone knows if chris latner is at least using swift in his new company ? I have the feeling swift never really worked in the server side, data science is now officially a failure, and all that is left is now a very niche market of 100% native mobile development. I love this language, but i'm eager to see it handled by a proper found…

> is now a very niche market of 100% native mobile development. Which just happens to be one of the biggest development niches in the world.

not really.. games are made with 3D tools (unity, etc), Form-based "data oriented" apps are made with cross-plateform tools (react native, xamarin, flutter, etc).

The only things left are a very small percentage, and add to that the fact that you either 1/ have the budget for 2 development teams, or 2/ afford to skip the other "half" of the market staying iOS only.

Re: Swift for TensorFlow Shuts Down

#85
post #26

It's a shame. I had high hopes at the beginning that S4TF - and the investment in Swift from Google - would help Swift break out of the iOS ghetto and cement it as a mainstream language. Swift's a delightful language to use. It has a lot of the nice things about Rust's type system, but is a heck of a lot easier to use at the expense of a bit of performance. For a lot of use cases, I think this is a great value propos…

What are some ways in which Python's type system should improve?

Have an effect at runtime.

Re: Swift for TensorFlow Shuts Down

#86
post #77

Earlier quoted context omitted.

I remember their terrible article trying to justify why Swift was the right choice out of a load of more appropriate languages. I'm still annoyed they didn't go with Julia.

Source? Curious to read that :D

Here you are: https://github.com/tensorflow/swift/blob/main/docs/WhySwiftF...

Re: Swift for TensorFlow Shuts Down

#87
post #6

Swift now being a 100% Apple-sponsored & owned project again makes me a bit nervous. Anyone knows if chris latner is at least using swift in his new company ? I have the feeling swift never really worked in the server side, data science is now officially a failure, and all that is left is now a very niche market of 100% native mobile development. I love this language, but i'm eager to see it handled by a proper found…

Don't worry, in a few years Apple will rewrite all their SDKs again in a different language. The churn may not be a deliberate strategy but it is certainly very effective in locking developers in.

Right... Because Apple has done that so many times... oh wait they have done it exactly once since re-launching after acquiring NeXT. IT was Obj-C and now it's Swift except they actively support Obj-C still, so I'm not sure what you are talking about?

Re: Swift for TensorFlow Shuts Down

#88

Earlier quoted context omitted.

It fundamentally can't be improved in a significant enough way and still be Python. The more realistic options are to be okay with Python's type system (I personally am) or to look at different languages if you really want something more robust.

I don't think that's accurate. Python's type system is largely defined by mypy + the annotations, in addition to runtime python. In that regard, python's type system has been evolving really quickly, and it's becoming something quite interesting. I'm a fanboy of static type systems, and in the last bunch of years, python's type system has gone from just bearable to really useful. I'm excited to see where it goes from…

But to some extent isn't it always going to be bolted-on and dependent on library authors to which extent it's consistent?

Re: Swift for TensorFlow Shuts Down

#89
post #63

Earlier quoted context omitted.

I disagree with the pitch, but the pitch I heard when this was announced was: * Swift lets you write code that's as concise as Python while still being fast, and therefore allows you to get away from the problem of having to write ML code in multiple languages (TensorFlow is actually mostly C++, which makes it difficult for a Python developer to debug.) * That the lack of static typing is a major pain point in Python…

> Swift lets you write code that's as concise as Python while still being fast, > (TensorFlow is actually mostly C++, which makes it difficult for a Python developer to debug.) To be honest, if I had to choose between Python and Swift I'd still choose Python. Swift is a nice evolution from Obj-C and all but it is nowhere near as simple as Python, or Ruby, or PHP, or Javascript, or Kotlin. And Apple's documentation of…

To say that Swift is "nowhere near as simple" as Javascript or Kotlin is a very strange opinion to me, and I have experience with all 3.

Simple as in syntax, memory management, or in what regard? I can't think of a single example where Swift is not equivalent or better. Do you have the same criticism of Scala?

Re: Swift for TensorFlow Shuts Down

#90
post #56

Swift for TensorFlow was a nice idea on paper, but you need more than ideas to push a project forward. You need people who actually want to use your product. For all the comments on HN about how great Swift was, there were hundreds if not thousands of ML engineer and research scientist who did not know it existed and frankly did not really care about it either. Swift for Tensorflow was not addressing the issues of ML…

It's interesting to compare Swift to Julia here – Julia had a base of people who absolutely loved it from the 0.2 days, and has managed to draw many users from Python/Matlab/R. There are many reasons for that, but overall Julia had something that really appealed to scientists: syntax they liked + competitive-with-C performance.

In contrast, S4TF's target audience seems to have been Swift developers, and they didn't really appeal to the data science crowd.

Post reply on HN