6 ms·
Swift 6.4 Released
- fatliverfreddy 13d ago[flagged]
- doc_ick 13d agoDon’t worry, that’s almost every other page on the feed
- boxed 13d agoI really hope the debugger improvements are noticeable. The number of times I've stopped in a debugger and I can't see the variables I want to look at has been extremely high.
- tarentel 13d agoSince the release of Swift. :|
- mpalczewski 13d agoit's surprising how often this has been an issue. given up on it a long time ago. now old school print statements instead. seem to work better anyway. the debugger isn't slowing the app down.
- skylurk 13d agoHuh I thought I just didn't know what I was doing
- afavour 13d agoI didn’t realise Swift in WebAssembly has come as far as it has. I’ll be interested to try it out, I’ve used Rust before now but Swift is definitely easier to work with.
- pwython 13d agoGoodnotes is already doing it. Their web app runs a large amount of the same Swift code used by their iOS app inside the browser through WebAssembly.
- davelester 13d agoGoodnotes wrote about their WebAssembly work on the Swift blog earlier this year: https://www.swift.org/blog/bringing-goodnotes-to-web-with-swift/ https://www.swift.org/blog/bringing-goodnotes-to-web-with-sw... From that post: "Shared Swift code: 1.47 million lines (66% of the web app, 34% of the iOS app)"
- asimovDev 13d agoAnyone have experience with embedded Swift or know any interesting embedded projects running on Swift?
- timsneath 13d agoOne fun example is this Playdate game: https://news.play.date/news/four-corners-swift/ https://news.play.date/news/four-corners-swift/ Here's a more comprehensive list of different platform examples: https://github.com/swiftlang/swift-embedded-examples https://github.com/swiftlang/swift-embedded-examples
- asimovDev 13d agoThanks! Interesting tidbit about not having the Foundation library. Every Swift project I worked on had to import that, so I imagine it's annoying to lose that
- Someone 13d ago> Here's a more comprehensive list of different platform examples: https://github.com/swiftlang/swift-embedded-examples https://github.com/swiftlang/swift-embedded-examples (About?) the same list in a nicely formatted way: https://www.swift.org/get-started/embedded/ https://www.swift.org/get-started/embedded/
- bnchrch 13d agoHappy to see Swift progress. Its a beautiful language and well thought out. Would love to see it expand outside of iOS
- bartvk 13d agoExcept for the rules around init
- MBCook 13d agoWhat do you mean?
- woadwarrior01 13d agoThis[1], I suspect. https://docs.swift.org/swift-book/documentation/the-swift-programming-language/initialization/#Initializer-Delegation-for-Class-Types https://docs.swift.org/swift-book/documentation/the-swift-pr...
- bartvk 13d agoInit can become a hassle. And I'm not the only one, I remember listening (to a podcast?) where Chris Lattner himself remarked that there were many nitty-gritty details to the init phase of objects.
- steve1977 13d agoYou can use it on macOS, iPadOS, watchOS and tvOS as well. Oh, and visionOS, at least for now.
- MattDamonSpace 13d agoFor now?
- steve1977 13d agoI don't know how long visionOS will survive, it seems Apple has scaled down further development of Vision Pro quite substantially. And for something like Meta-style smart glasses, visionOS is probably not a good fit.
- airstrafer 13d agoA very solid release with very nice immediate conveniences/improvements and foundational long term work. I’m particularly impressed at the team’s continued investment in non-Apple platforms. IMO, true cross platform Swift codebases still seems out of reach for most shops. But if they keep this up for a few more years then Swift could become a very compelling cross platform language — for both systems and application programming. The big hurdle they need to figure out is the standard library and especially SwiftUI. SwiftUI is the single most important library that essentially all Apple swift codebases use, so until there is a real cross platform SwiftUI then for app programming IMO Swift will remain a novelty. There are other frameworks, like eg Network.framework, which really should be in the stdlib as well.
- MBCook 13d agoSwiftUI is Apple secret sauce. That’s never going to be released. All the compiler features are there. Others can make similar libraries or other new libraries. But I don’t see why Apple would ever release that outside Apple land. Swift can still be used for shared logic and server stuff and command line tools and GUIs using other libraries.
- MattDamonSpace 13d agoNot to mention it’s built on top of Apple’s other private UI frameworks
- MBCook 13d agoActually that’s supposed to have switched this year. Reportedly the legacy stuff is now wrapped SwiftUI so they all render the same buttons/text boxes/etc. No more 2 (or maybe 3 for carbon?) implementations. Hopefully this will let them add features and fix bugs faster.
- woadwarrior01 13d agoIncidentally, there's a nascent OSS project called OpenSwiftUI. https://github.com/OpenSwiftUIProject/OpenSwiftUI https://github.com/OpenSwiftUIProject/OpenSwiftUI
- adamnemecek 13d agoLooking at things like this ``` let result = try await Subprocess.run( .name("ls"), arguments: ["-la"], output: .string(limit: 4096) ) print(result.standardOutput)` ``` reminds me that macOS could really use something like powershell (I know you can run powershell on macOS) where you pass around structured data, rather than the endless parsing and reparsing. This is mostly a feature of the shell but you do need some language infrastructure to accomplish it.
- drfloyd51 13d agoSo you mean the ability to run a shell from code And receive structured data back?
- adamnemecek 13d agoSomething like that yes. The endless parsing and reparsing that you need to do in the unix shells is such a pain.
- steve1977 13d agoIt's both curse and blessing. Of course it gives you ultimate freedom, but like with programming languages, I personally prefer the guardrails that a type system provides.
- adamnemecek 13d agoWe are on the same page then.
- dadoum 13d agoTo me the secret sauce behind powershell is the .NET infrastructure, which allows much more runtime introspection than the usual compiled programming languages, allowing a lot of flexibility without being too wonky. Unfortunately the Windows team seemed to not be on board with this vision, and thus it cannot achieve its full potential. The objective-c runtime may have been a good alternative here too, but I don't think Apple is encouraging its use anymore (and Objective-C is not the right language for that, neither is AppleScript imo).
- wslh 13d agoI just realized Swift has support for embedded hardware [1]. It's very niche but having a high level programming language as Swift is a great option. [1] https://github.com/swiftlang/swift-embedded-examples/blob/main/README.md https://github.com/swiftlang/swift-embedded-examples/blob/ma...
- Decabytes 13d agoYes to the subprocess 1.0. CommandLine utils are how I try out any new language. I feel like Swift hits the sweet spot for me in terms of safety, cross platform capability, ahead of time compilation, and automatic memory management compared to other languages currently available.
- tancop 13d agoI love the friendly competition between Swift, Rust and Zig. Swift has been adding borrow checking features for a while, now they also have arenas, better C interop and more language support for non GC platforms.
- busymom0 13d agoI am building the backend of a social media app I am making in Swift. I've previously used Vapor for the web server but right now, I am trying out Hummimgbird. Has anyone tried either? Would love to hear your experience with them.
- elpakal 13d agoMan I can't count the number of shell wrappers I've written or reached out to over my career. Looking forward to having an official Swift SubProcess helper.
- myHNAccount123 13d agoThis is a very impressive release. The continued type checker improvements are amazing, improved memory safety helping to expose hidden traps, improved debugging, improved dev experience for Android. Great job!
- Ta_Panters 13d agoIts really a shame Swift had to be the Apple language, it is really very nicely made
- mrtesthah 13d agoThis is a troll comment considering the post is all about Swift’s portability on other platforms.
- Ta_Panters 13d agoIt isn't, I didn't deny Swift's usability in other platforms, but you'll see it barely mentioned anywhere else, and Swift Circles are also mainly centered around Apple
- vor_ 12d agoIt's been over a decade since Swift came out, and cross-platform Swift remains extremely niche. I think that ship has sailed and that Swift is in the same situation Objective-C was, perceived as being an Apple language for Apple platforms, controlled by Apple.
- vor_ 12d agoI think a lot of the cross-platform interest from other companies diminished after features like result builders were quietly dropped in to support SwiftUI, with the usual community review process happening after it was already revealed at WWDC and shipping in Xcode (!). It's clear that Apple runs the show, and like Objective-C, it seems destined to be primarily an Apple language for Apple platforms and tools.
- lemonginger 13d agoAs a coder of 30+ years in various other languages that sincerely wants to learn Swift can someone please help me understand why it is not diametrically opposed for a company to suggest, effectively in the same breath no less, that I should learn to code Swift myself and/or just have some AI do it? Every time I set out to learn I just feel like I'm being an idiot because in a year, or now, nobody will hand code anything. And even if we still reckon that some knowledge will be required to verify the voluminous output of AI there is now a vast moat of Jr. unemployability that has arisen making it exponentially harder to justify learning to code in the first place? groan
- lordnacho 13d agoIf you have that much experience, swift is probably just a mix of what you already know? Do a couple of tutorials and then you are ready to vibe it. It's the people who haven't done the grind of learning a new language so have the problem, since LLM will give them solutions but not experience.
- rTX5CMRXIfFG 12d agoIf you're looking for a pay off for learning anything at all, just don't---AI is projected to take over a lot of knowledge areas. You'd better invest in learning a physical skill or build a network of high net worth people and somehow make something of it. Now, if AI eating the world doesn't matter to you, then just learn what you want to learn.
- a_chmerev 12d ago[flagged]