4 ms·
> Apple is not trying to potentially attempt to aim for maybe replacing every other programming language with Swift Apple's stated goal is to make Swift a viab
by favorited 2y ago
> Apple is not trying to potentially attempt to aim for maybe replacing every other programming language with Swift
Apple's stated goal is to make Swift a viable language up and down the technology stack, which goes way beyond Objective-C. They are actively working on making Swift viable in baremetal environments, firmware, drivers, etc. IIRC they even referred to it as a C++ successor language at WWDC this year.
I agree that they're not trying to "replacing every other programming language," but they're investing in it becoming a viable language choice in most environments.
- refulgentis 2y ago> they even referred to it as a C++ successor language Nice! I'd gently warn against parsing that too closely: having been in the community and the weeds starting in 2014(!). ex. the cross platform Foundation was announced and open sourced in 2016. I'm sure a lot of things were upgraded or more consistent and its better etc., but it's a painful to remember what was expected + communicated at the time, and how much later it is.
- tcmart14 2y agoWhich I think that makes sense for them to want it to be viable all over the stack. It also directly benefits them also. I am assuming a lot of the motivation for embedded swift is being able to use it in their own stacks. I think even the presentation for WWDC gave examples of it being used in some pieces of hardware like on the AppleTV?
- rudedogg 2y ago> They are actively working on making Swift viable in baremetal environments, firmware, drivers, etc. I don’t think Swift has a place in these niches FWIW. Writing low-level Swift code is very verbose and unnatural. Personally I just don’t think it’s practical to have a single language excel across the stack.
- newaccount74 2y agoI think the goal of Swift on the server, or embedded Swift, is mainly to offer Mac and iOS developers a way to write everything in the same language. Right now, my Mac app depends on a few simple web services that are written in a different language. It would be neat if those services could be written in Swift, so that I could just use the language I already know instead of relearning how to do decode JSON in Python/Ruby/PHP. Swift on the server doesn't have to become widely used. As long as there is a simple way to write basic web services, it is useful.
- pzo 2y ago> It would be neat if those services could be written in Swift, so that I could just use the language I already know Then somebody else would have to now learn Swift even thought they write in different language like: Android Developers (Kotlin/Java), React Native devs (JS/TS ), Windows Devs, Linux Devs etc. As long as Apple don't invest more in official cross-platform tooling Swift is not gonna be mainstream (even though I like Swift). They have to bless other competing platforms.
- newaccount74 2y agoI was more thinking of smaller teams or individual developers that are Apple only. If you have a bigger team, then it doesn't matter as much, because you have different people who do the iOS app, people who do the website, people who do the back end etc. Swift on the server doesn't have to go mainstream to be useful. If you just need some basic web service that syncs highscores or verifies in-app purchases then it would be neat if you could write that in the same language as the app itself.
- myko 2y agoJohn McCall (Swift team) gave a talk on Swift replacing C++ earlier this year: https://www.youtube.com/watch?v=lgivCGdmFrw https://www.youtube.com/watch?v=lgivCGdmFrw Selfishly I wish mixed C targets were a priority before C++ but I get why this was more important to them
- mpweiher 2y agoHuh? Objective-C was in the kernel.
- lukeh 2y agoIn NEXTSTEP, yes, but not macOS.
- mpweiher 2y agoAnd they regretted the decision not to do it in macOS.
- MBCook 2y agoWas it? Objective-C requires a runtime. I thought the kernel was always C/C++.
- favorited 2y agoThere is code in the kernel to enable treating types like `os_log_t` and Clang blocks as Objective-C objects higher up the stack, but the XNU kernel itself is almost entirely C and C++.
- mpweiher 2y agoYeah, on macOS. On NeXTStep / OPENSTEP kernel drivers could be and were written in Objective-C. https://www.nextcomputers.org/files/manuals/nd/OperatingSystem/Part3_DriverKit/Reference/Classes/IntroDriverKitClasses.htmld/index.html https://www.nextcomputers.org/files/manuals/nd/OperatingSyst...
- KerrAvon 2y agoNeXTstep 3.3 supported Objective-C drivers in the kernel. Mac OS X's IOKit changed them to use a (poorly defined/maintained subset of) C++.
- MBCook 2y ago
- saagarjha 2y agoApple says a lot of things at WWDC. Not all of them are entirely honest.
- MBCook 2y agoDo you have any evidence they’re not targeting it as their main everywhere language? It’s already been used in their libraries, their OSes, and even firmware on embedded processors.
- saagarjha 2y agoI think this conversation has a lot of parallels to their public views on SwiftUI. Are they working on it? Yes. Will it maybe end up being what they consolidate around sometime in the future? Maybe. Does that mean you should believe them when they say it’s the biggest thing you should invest in right now? No.
- MBCook 2y agoThey’re pretty clear on both. UIKit, AppKit, and Objective-C(++) aren’t getting new features except in rare cases. This is the way forward. And they’re dogfooding it. Even in some of their embedded processors.
- lapcat 2y agohttps://live.arstechnica.com/apples-wwdc-2014-keynote/images/IMG_0018.JPG https://live.arstechnica.com/apples-wwdc-2014-keynote/images...