this post was submitted on 17 Sep 2024
64 points (98.5% liked)

Programming

17681 readers
79 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
64
Announcing Swift 6 (www.swift.org)
submitted 3 months ago* (last edited 3 months ago) by popcar2 to c/programming
 

The big thing about this release is it is a huge leap forward to making Swift a cross-platform language, and not something only built for Mac/iOS

Swift 6 unifies the implementation of Foundation across all platforms. The modern, portable Swift implementation provides consistency across platforms, it’s more robust, and it’s open source. macOS and iOS started using the Swift implementation of Foundation alongside Swift 5.9, and Swift 6 brings these improvements to Linux and Windows.

Swift is designed to support development and execution on all major operating systems, and platform consistency and expansion underpins Swift’s ability to reach new programming domains. Swift 6 brings major improvements to Linux and Windows across the board, including support for more Linux distributions and Windows architectures. Toolchains for all of the following platforms are available for download from Swift.org/install.

top 3 comments
sorted by: hot top controversial new old
[–] FizzyOrange 14 points 3 months ago (1 children)

Swift users... how is it? I hear compile times are bad. Worse than C++/Rust?

[–] roanutil_ 14 points 3 months ago* (last edited 3 months ago)

I can’t compare compile times to C++ or Rust but I would expect it to be in the same ballpark of Rust. However, the way I develop is with all external dependencies binary cached so I only have to build my code.

As far as the language itself is concerned, I love it. It really is like a, “Diet Rust Lite”. By which I mean, it’s powerful but a lot less pedantic by doing some things for you that Rust puts on the developer. If you’re deploying in an environment that can tolerate less fine control over memory use and instructions, Swift is the better option IMO.

If you’d like to read the observations of a team that can really evaluate Swift and compare it to other options: https://forums.swift.org/t/our-journey-with-swift-thus-far-some-notes-and-reflections/70510

Id be happy to discuss finer points if anybody wants.

Edit: Swift for C++ devs series by a swift core team member — https://www.douggregor.net/posts/swift-for-cxx-practitioners-value-types

[–] [email protected] 4 points 3 months ago

Finally! I've always been enamored with Swift, but Linux compatibility has been a consistent pain point. Can't wait to give it a try