10 ms·
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 ?
by bsaul 6y ago
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 foundation with big names behind, as it's a really great language.
- mottiden 6y agoWhat do you mean by data science being a failure?
- nt591 6y agoPresumably "Swift for data science" is a failure, not the idea of data science as a whole
- MrPowers 6y agoIt seemed like Swift looked like a promising language for data science a few years ago. I'm not familiar with Swift. Can anyone provide additional context as to why the language seemed promising for data?
- SatvikBeri 6y agoI 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, and Swift's type system would help write code with fewer errors.
- deleted 6y ago[deleted]
- ljm 6y ago> 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 these things is pretty woeful at the best of times lately. I also disagree with the pitch, is what I'm saying.
- aplummer 6y agoTo 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?
- ljm 6y agoI do. Scala is insanely complicated once you inherit a codebase full of implicits and custom operators.
- The_rationalist 6y agoSwift has no traced garbage collector which means you cannot represent circular data structure/references. Also swift support for interfaces (protocol) is sub-par with today standards
- echelon 6y agoSwift never had a good outside-Apple story. Apple isn't the sort of company that jumps at opening up its platform or tooling for non-Apple uses. There's nothing wrong with this. Swift can be the best language for the Apple platform and find lots of success in that.
- saagarjha 6y agoLLVM? WebKit?
- tsegratis 6y agoNeither originated with Apple, though I agree Apple did a lot to push them and make them what they are
- favorited 6y agoOK, Clang then.
- coolspot 6y agoIt’s started in the Univerity of Illinois, and still under their source code license.
- favorited 6y agoNo, that's where LLVM started. Clang was started from scratch at Apple to replace the GCC-LLVM frontend. https://llvm.org/devmtg/2007-05/09-Naroff-CFE.pdf https://llvm.org/devmtg/2007-05/09-Naroff-CFE.pdf
- pjmlp 6y agoOnly because of GPL3, otherwise everyone would still be using GCC nowadays.
- 6y ago
- Hamuko 6y ago>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"].
- ChrisMarshallNY 6y agoI 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 long time (unless you count drivers). I think Swift is an almost ideal application-level language. I'm not especially bothered by it being Apple-only. It works on all Apple-supported hardware, has a new application toolkit coming into play (SwiftUI), and has a very active development community. Spend some time on the Swift discussion forum to see some pretty heady discussions.
- raydev 6y agoWe'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.
- _qulr 6y ago> there's every indication that all new Apple frameworks are being written in Swift There's no such indication. "The number of binaries using Objective-C is still growing with each iOS release." https://blog.timac.org/2020/1019-evolution-of-the-programming-languages-from-iphone-os-to-ios-14/ https://blog.timac.org/2020/1019-evolution-of-the-programmin...
- mplewis 6y ago
- Zababa 6y ago> I have the feeling swift never really worked in the server side IBM dropped Kitura more than a year ago [1]. There's Vapor [2] which seems popular, but I don't know how much. [1]: https://forums.swift.org/t/december-12th-2019/31735 https://forums.swift.org/t/december-12th-2019/31735 [2]: https://github.com/vapor/vapor https://github.com/vapor/vapor
- deleted 6y ago[deleted]
- grey-area 6y agoDon'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.
- geoffpado 6y agoApple churns languages every few years? They kept Objective-C around for 13 years before introducing Swift, and that was a language that was widely disliked by people from outside the Apple ecosystem. You can still use it for the vast majority of OS features today[0], nearly 20 years after it was first used on Apple platforms. Heck, Obj-C is used for Mac/iOS development because that was the preferred language for Mac OS X's immediate ancestor, NextSTEP, which means that it's been a part of the same development ecosystem for about 30 years. If this is churn, I think I'm okay with it. [0] As far as I know, the only system feature that requires Swift is iOS 14/macOS 11's new widgets, which must be written in SwiftUI.
- pjmlp 6y agoAlthough I agree with your post, I still remember the Object Pascal, C++ PowerPlant/Carbon and Java Bridge days.
- grey-area 6y agoNext is not MacOS so I think it’s a real stretch to claim that means long term support! Perhaps some of this is normal but I think Apple have made little effort to avoid churn and it suits them to keep things changing. Apple have had significant churn in dev tooling, languages, sdks, frameworks, chip architectures over the last couple of decades. Perhaps that is completely normal but it does mean developers are always struggling to keep up, and an app written for iOS 1.0 needs significant alterations if not a rewrite to work with later versions. Almost everything has been completely replaced, from language to frameworks to dev tooling like resources.
- deleted 6y ago[deleted]
- 6y ago
- Grustaf 6y ago> Swift now being a 100% Apple-sponsored & owned project again makes me a bit nervous. Are you nervous about a language that is designed and supported by the largest and most successful company in the world? > very niche market of 100% native mobile development That "niche" is at least 1.5 billion devices. Devices bought by the 1.5 billion richest people in the world because they like them, not because their employers forced them to. Seems like a pretty ideal "niche". But I wouldn't agree that "swift never worked server side". I've built several backends in Vapor and it's amazing.
- iujjkfjdkkdkf 6y ago> Are you nervous about a language that is designed and supported by the largest and most successful company in the world? Yes, I am. The concentration of power between facebook and google for ML frameworks is worrying enough, but to their credit, they have so far been very open and collaborative and are giving a lot back to the ML community in terms of research Apple on the other hand is the dictionary definition of walled garden. Their controlling and insular nature has been the reason for their success, and power to them, but for something as fast moving and community driven as machine learning, I would be very wary if relying on them for any part of it.
- jamil7 6y agoI think there is too much focus on Swift as a general purpose language. I really enjoy working in it and it’s great at what it does, does it have to be deployed in every domain?
- Grustaf 6y agoThat was Chris Lattner's original dream at least, but I suppose it can remain viable even if it is "only" used on Apple's billion+ devices.
- samatman 6y agoThis is so bizarre to me. What possible future are you trying to ward off here? Swift is an open-source project, it's self-evidently in Apple's interest for as many people as possible to use it. Be concrete, please. What scares you about using an open-source language which is mostly developed by Apple? Do you have the same paranoia about clang? If not, why not, what's the difference?
- jimbokun 6y ago> 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.
- bsaul 6y agonot 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.
- jdmcd 6y ago> I have the feeling swift never really worked in the server side Vapor [1] is wonderful to work with and has a large user base. Apple is also putting significant resources into Server Side Swift with Swift NIO [2]. Lots of really cool stuff happening in that ecosystem [1]: https://vapor.codes https://vapor.codes [2]: https://github.com/apple/swift-nio https://github.com/apple/swift-nio
- bsaul 6y agoI don’t think swift’s performance is good enough to really make a dent in that area vs rust/java and C. Nor are its macro-programming ability enough to compete with dynamic (and slow) languages. Now there’s still go market of « server middleware ». But for that it would need a much higher quality of core libraries, tooling, and a much better concurrency story. Maybe it’ll come with the incoming actors, but somehow i doubt it (the underlying concurrency libraries remaing grand central dispatch, which looks too heavy compared to, for ex, goroutines)
- johnnycerberus 6y agoChris Lattner's new company is mostly using Scala and C as far as I know. [1] [1] https://github.com/sifive https://github.com/sifive
- PostThisTooFast 6y agoWait, what? How does not using it for TensorFlow mean it's all Apple-controlled again suddenly? Also, it's not 100% mobile, since you can also write Mac apps in it. It is a shame that Swift hasn't been more widely adopted. The proliferation of languages over the last few years has gotten pretty annoying. And what of Kotlin? That's even more niche at this point.
- cutler 6y agoI don't get the hype about Swift. There are at least 4 features in Swift I can think of that are just plain clunky: 1. Backslashed opening parens for string templating 2. Parameter labels and the use of _ when ignored 3. Splitting method names across opening parens eg. `move (to ....` 4. Verbose NSString Objective-C hangover in regular expressions
- bsaul 6y agoThose are really minor syntax details (except maybe the regex stuff, that’s more a library issue than a language one). Swift is safe (no null pointer exception), has predictable garbage collection performance through ARC, has a familiar C-style syntax (easier to get on-board), has compile-time type checking, good-enough generic programming support, algebraic data types with pattern matching, and will very soon get actor support. Plus, it has the potential to become a good cross-platform language since it’s using llvm, all it needs is a bit more love on tooling and libraries. I don’t see many other languages with those characteristics..
- lmm 6y agoSwift just seemed like yet another OCaml-like language to me; there are certainly far worse languages to borrow from, but I don't see any compelling reason why I'd use it over OCaml. ARC has the same worst cases as mark/sweep GC AIUI; exiting any scope might cause an arbitrarily large amount of cleanup work in the general case, and it doesn't solve the memory fragmentation problem which is the main reason you still need to occasionally stop the world (ish) in a mark/sweep GC.
- GregarianChild 6y agoI agree from a technical POV, but there is a social reason (network effect): Swift has Apple-backing, OCaml is not currently supported by any of the big, influential software companies. OCaml's main backer now is Jane Street who do a lot, but is too small, and Facebook's support (via ReasonML) is too half-hearted to be compelling. As a former OCaml programmer, I would not currently bank a career or startup on OCaml. Indeed I've been doing OCaml programming over the last few weeks (and seen the shortcomings of OCaml's current library eco-system vis-a-vis more mainstream languages) in order to interface with a big existing OCaml development, and they told me they decided to move to Rust for all future new developments. I say this with a heavy heart, as somebody who spent his first decade as a programmer with OCaml. Interestingly, even in Feb 2021, there is no compelling mainstream alternative to OCaml (in the sense that e.g. Jane Street are using OCaml): Haskell's being lazy, Java/Scala etc as well as F#/C# being JIT'ed make performance predictability difficult. Rust does not have this problem, but for many tasks where software engineering agility is a more important consideration that extreme performance (which might be most in-house business software?), a GC'ed language would appear to be more suitable. (No language war please ...)
- pjmlp 6y agoSwift lovers have to grasp that unless Apple actually puts the effort like Microsoft started doing with .NET, it is going to be used outside Apple eco-system as much as Objective-C has been used in the last 30 years. There is no way out of it.
- deleted 6y ago[deleted]