I believe that this long game of Swift being "good for everything" but "better for Apple platforms" will be detrimental to the language. This does not help the language nor seems to bring more people to the ecosystem.
Competitors seems to have a combination of:
- Being more open-source
- Have more contributors
- Have a narrower scope
Maybe they should consider open sourcing all the tooling (like Xcode) otherwise the gap will only grow over time when compared to other languages.
But one thing that blows my mind is that if you ever encounter an "index out of range" error, the (massive) error message that you get doesn't tell you anything about where this error occurred... no line number... no nothing...
You have a stack dump, which means you will get all the information if you symbolicate your crash report. Xcode can do it for you automatically, but some manual methods also exist.
Swift outside of Xcode is a bit rough around the edges, I think because more attention goes into making Xcode friendly. I opened Xcode, made a new playground, and hit run, the code crashes and highlights the line where the error occurred in red. Not to excuse Swift's jankyness, just saying that the kind of default experience is more an IDE-first design compared to Go's very good unix-first design.
But it is doomed to fail as a general widely adopted language unless apple makes few critical moves including open sourcing everything including XCode, providing support for 3d party IDE developers (because xcode is terrible), creating decent package manager, adopting testing as first class citizen etc.
There is just no economical sense for anyone to invest in swift until all the above (and some more) is done.
For what it's worth, they ship a solid VS Code extension and LSP. Their swift-testing package is the new open source and cross-platform successor to XCTest. The same can be said of swift-foundation as compared to Foundation.
The path they've chosen is not to open source Xcode, but to move the things Swift needs on all platforms to the Swift language project and common implementations.
Personally I think the main problem with the language, besides Apple's earned poor reputation in FOSS circles, is the compile times. In the source-stable era of the language I'm not sure how they can really be fixed to the degree I'd be happy with.
Your wishlist seems midly contradictory. Why does Apple need to open-source XCode if they also provide support for 3rd party IDEs (which they already do, btw)? Also what do you not like about cocoapods for package management?
Plenty of people make an incredible amount of money building apps in Swift, so your last sentence is just wrong.
And make it possible to run binaries on macOS/iOS etc without a mandatory subscription and US export controls. Without notarisation, anything made with Swift is practically unusable on Apple OSs
The discussion here reminds me so much of early C# days. It was being touted as open source and cross platform back then, and Microsoft even hired a top GNOME developer to port it to Linux and GNOME was going to be rewritten in C#. It was going to be amazing. Never quite panned out.
I think you might have the history mixed up a bit. The Mono project started without Microsoft's involvement (and they were probably even annoyed by it at the time).
GNOME was betting on their own Vala language, which is still a thing, but never really gained much traction.
Eventually Microsoft bought Mono during their embrace of open source.
> With this release, SwiftPM now has the opportunity to offer a unified build execution engine across all platforms.
this is what the big deal is. it might not achieve much on its own immediately, but this is the key to build a truly multiplatform ecosystem of libraries, tools and applications in Swift. we should expect to see more of that soon.
Apple’s software decisions over the last 15 years have created significant friction for developers trying to build on their platforms. Apple’s approach to software development has felt like it’s prioritizing business interests over the ease and flexibility that developers need to build high-quality, useful software.
Swift is a nice language. I'm glad to see it being released from the clutches of Apple. I can only imagine how large of a task this is. I hope some day to be able to use it. The last time I tried a cross-platform project with it I switched languages due to `URLSession.shared.data` (a network request) being unable to compile on Linux.
Is it really being released? Although some parts of the language and build chains are technically open source (as in, you can see the code), the project is still completely controlled by Apple at the top.
Although opinions inside Apple about Swift vary, they seem to be investing in low level Swift for embedded, kernel use, and programming the “Secure Enclave” subsystem.
They certainly have many opportunities to use it for headphones, AirTag, flash driver, etc, beyond the very believable but less embedded use in kernel/Secure Enclave.
Apple probably has use cases for this and they’re bringing it into the open as a nice marketing thing. I wouldn’t count on long term support or compatibility beyond current priorities for Apple (same as their other SDKs for iOS, macOS etc).
This is great, if for no other reason that it will give people the ability to debug build issues on their own and get access to fixes without having to wait for the next Xcode release.
Reading this it’s not clear - how well integrated is swift build with swift’s tooling and language server? I know the language server has been open source for a while now. Having them be separate seems like it would create issues with duplicate code.
The article doesn't mention the differences with current swift package manager build system. The repository doesn't mention it either, just saying that swiftpm can use the new build system by adding an argument. Anybody does what does this actually changes? Does it improve something for non-Apple platforms?
I wish they would stop adding anything to the language and document what they have. I constantly need to reverse engineer how things work. For example, I just had to integrate AccessorySetupKit and the docs are laughable.
[+] [-] uhura|1 year ago|reply
Competitors seems to have a combination of: - Being more open-source - Have more contributors - Have a narrower scope
Maybe they should consider open sourcing all the tooling (like Xcode) otherwise the gap will only grow over time when compared to other languages.
[+] [-] alain_gilbert|1 year ago|reply
But one thing that blows my mind is that if you ever encounter an "index out of range" error, the (massive) error message that you get doesn't tell you anything about where this error occurred... no line number... no nothing...
Is all you have to do to reproduce the error.The error looks something like that https://pastebin.com/MQV82SaR
And gives you no useful information as to how it happened or how to fix it.
compare that with Golang which tells you, it happened in main.go at line 4.
EDIT: with the LLVM_SYMBOLIZER_PATH set https://pastebin.com/8M9Dbrgj this doesn't provide anything useful either.[+] [-] mojuba|1 year ago|reply
[+] [-] g0ld3nrati0|1 year ago|reply
``` swift_hello_main + 322 in swift-hello at /home/fermi/Documents/temp/swift-hello/Sources/main.swift:64:8
```[+] [-] Pesthuf|1 year ago|reply
>Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
?
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] saagarjha|1 year ago|reply
[+] [-] jitl|1 year ago|reply
https://monosnap.com/file/qhlwD6aXUW5bcl3TV5lPmKFDgjWDtD
[+] [-] AdrianEGraphene|1 year ago|reply
[+] [-] compootr|1 year ago|reply
[+] [-] aristofun|1 year ago|reply
But it is doomed to fail as a general widely adopted language unless apple makes few critical moves including open sourcing everything including XCode, providing support for 3d party IDE developers (because xcode is terrible), creating decent package manager, adopting testing as first class citizen etc.
There is just no economical sense for anyone to invest in swift until all the above (and some more) is done.
[+] [-] easeout|1 year ago|reply
The path they've chosen is not to open source Xcode, but to move the things Swift needs on all platforms to the Swift language project and common implementations.
Personally I think the main problem with the language, besides Apple's earned poor reputation in FOSS circles, is the compile times. In the source-stable era of the language I'm not sure how they can really be fixed to the degree I'd be happy with.
[+] [-] fastball|1 year ago|reply
Plenty of people make an incredible amount of money building apps in Swift, so your last sentence is just wrong.
[+] [-] isodev|1 year ago|reply
[+] [-] frizlab|1 year ago|reply
[+] [-] krupan|1 year ago|reply
[+] [-] kelnos|1 year ago|reply
GNOME was betting on their own Vala language, which is still a thing, but never really gained much traction.
Eventually Microsoft bought Mono during their embrace of open source.
[+] [-] pjmlp|1 year ago|reply
The only UNIX Microsoft has ever supported during pre-Satya days, was Rotor for FreeBSD, nothing else.
Mono and DotGNU had nothing to do with Microsoft until Xamarin acquisition.
[+] [-] WuxiFingerHold|1 year ago|reply
I don't know what you're talking about, honestly. Maybe you're many years behind the current state of affairs.
.NET (core) is a very real thing. A extremely successful and powerful multi platform framework.
[+] [-] raydev|1 year ago|reply
Do you have a source for the GNOME C# claim? I can't find one.
[+] [-] homarp|1 year ago|reply
[+] [-] tux3|1 year ago|reply
XCode has been compared to many things, but at 3.1 stars on the App store, one must find that it is still slightly overrated.
[+] [-] de_aztec|1 year ago|reply
> With this release, SwiftPM now has the opportunity to offer a unified build execution engine across all platforms.
this is what the big deal is. it might not achieve much on its own immediately, but this is the key to build a truly multiplatform ecosystem of libraries, tools and applications in Swift. we should expect to see more of that soon.
[+] [-] ustad|1 year ago|reply
[+] [-] picafrost|1 year ago|reply
[+] [-] isodev|1 year ago|reply
[+] [-] sgt|1 year ago|reply
[+] [-] timsneath|1 year ago|reply
At WWDC24, we shared a session on embedded Swift, which is available on YouTube: https://www.youtube.com/watch?v=LqxbsADqDI4
More documentation on embedded Swift tooling here: https://github.com/swiftlang/swift/blob/main/docs/EmbeddedSw...
(Disclosure: I work at Apple.)
[+] [-] jitl|1 year ago|reply
They certainly have many opportunities to use it for headphones, AirTag, flash driver, etc, beyond the very believable but less embedded use in kernel/Secure Enclave.
See also the wwdc session where they propose swift for building smart home thingies https://youtu.be/LqxbsADqDI4?si=KTYWPLdjGgTwK1UB
[+] [-] _mlbt|1 year ago|reply
https://developer.apple.com/videos/play/wwdc2024/10197
Swift is a great language, but it is unfortunately still held back by the stigma of being perceived as only usable on Apple platforms.
[+] [-] pjmlp|1 year ago|reply
[+] [-] isodev|1 year ago|reply
[+] [-] easeout|1 year ago|reply
[+] [-] rkunde|1 year ago|reply
[+] [-] layer8|1 year ago|reply
The corporate language throughout that post is pretty cringe. It seems so unnecessary.
[+] [-] paul_e_warner|1 year ago|reply
[+] [-] walterbell|1 year ago|reply
Recent discussion of Xcode, https://news.ycombinator.com/item?id=42803290
[+] [-] frizlab|1 year ago|reply
[+] [-] msk-lywenn|1 year ago|reply
[+] [-] jakepetroules|1 year ago|reply
Yes! This will improve the Swift and SwiftPM experience for _all_ platforms.
There are a number of goals outlined on our forums post https://forums.swift.org/t/evolving-swiftpm-builds-with-swif..., which goes into much more detail.
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] yuyafujimoto|1 year ago|reply
[+] [-] seanvelasco|1 year ago|reply
[+] [-] frizlab|1 year ago|reply
[+] [-] easeout|1 year ago|reply
[+] [-] bla3|1 year ago|reply
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] MetallicCloud|1 year ago|reply
[+] [-] bhokbah|1 year ago|reply