NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Swift 6.4 Released (swift.org)
airstrafer 33 minutes ago [-]
A 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 26 minutes ago [-]
SwiftUI 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.

woadwarrior01 11 minutes ago [-]
Incidentally, there's a nascent OSS project called OpenSwiftUI.

https://github.com/OpenSwiftUIProject/OpenSwiftUI

MattDamonSpace 17 minutes ago [-]
Not to mention it’s built on top of Apple’s other private UI frameworks
pohl 13 minutes ago [-]
“Novelty” is a stretch. There’s a lot of headless code in the world.
myHNAccount123 2 minutes ago [-]
This 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!
tancop 15 minutes ago [-]
I 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.
Ta_Panters 1 minutes ago [-]
Its really a shame Swift had to be the Apple language, it is really very nicely made
Decabytes 15 minutes ago [-]
Yes 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.
bnchrch 40 minutes ago [-]
Happy to see Swift progress. Its a beautiful language and well thought out. Would love to see it expand outside of iOS
chairhairair 28 seconds ago [-]
Beautiful? Just the number of keywords and reserved words and compiler attributes makes it very ugly to me. There are so many ways to do things (and if SwiftUI is involved I can expect a significant subset to... just not work - but I don't think that's the language's fault).
bartvk 31 minutes ago [-]
Except for the rules around init
MBCook 25 minutes ago [-]
What do you mean?
woadwarrior01 9 minutes ago [-]
steve1977 21 minutes ago [-]
You can use it on macOS, iPadOS, watchOS and tvOS as well. Oh, and visionOS, at least for now.
MattDamonSpace 16 minutes ago [-]
For now?
steve1977 42 seconds ago [-]
I 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.
elpakal 8 minutes ago [-]
Man 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.
afavour 50 minutes ago [-]
I 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 41 minutes ago [-]
Goodnotes 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 16 minutes ago [-]
Goodnotes wrote about their WebAssembly work on the Swift blog earlier this year: 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 30 minutes ago [-]
Anyone have experience with embedded Swift or know any interesting embedded projects running on Swift?
timsneath 11 minutes ago [-]
One fun example is this Playdate game: 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

busymom0 10 minutes ago [-]
I 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.

boxed 50 minutes ago [-]
I 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.
skylurk 26 minutes ago [-]
Huh I thought I just didn't know what I was doing
mpalczewski 45 minutes ago [-]
it'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.
tarentel 49 minutes ago [-]
Since the release of Swift. :|
wslh 28 minutes ago [-]
I 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/ma...

adamnemecek 29 minutes ago [-]
Looking 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.

dadoum 17 minutes ago [-]
To 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).
steve1977 4 minutes ago [-]
You can also access COM from PowerShell, which basically opens up a lot of the Windows world to it.

And both .NET and COM and the object-oriented history of Windows is probably also why PowerShell will never really feel "at home" on UNIX platforms, for better or worse.

bbkane 17 minutes ago [-]
They should adopt Nushell! It would be seen as very "Apple"- a brave great somewhat non interoperable user experience upgrade
adamnemecek 12 minutes ago [-]
I was a big fan of Nushell for some time but has the same problems as unix shells. I have this CLI tool that manages a lot of things for me (a big one is downloading and cataloging arxiv papers, it downloads them and tags them with metadata and gives each PDF a proper filename based on the author's name and publication year). I tried building this in Nushell but it became eventually so painful.
drfloyd51 19 minutes ago [-]
So you mean the ability to run a shell from code And receive structured data back?
adamnemecek 14 minutes ago [-]
Something like that yes. The endless parsing and reparsing that you need to do in the unix shells is such a pain.
steve1977 2 minutes ago [-]
It'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.
fatliverfreddy 50 minutes ago [-]
[flagged]
doc_ick 36 minutes ago [-]
Don’t worry, that’s almost every other page on the feed
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 16:47:41 GMT+0000 (Coordinated Universal Time) with Vercel.