• davel@lemmy.ml
    link
    fedilink
    English
    arrow-up
    8
    ·
    17 hours ago

    That is good news! I wouldn’t have guessed Swift, but I can see why Swift 6—which has been GA for a year—might make sense: https://www.swift.org/blog/announcing-swift-6/

    C++ interoperability

    Swift 5.9 introduced bidirectional interoperability with C++ to seamlessly bring Swift to more existing projects. Swift 6 expands interoperability support to C++ move-only types, virtual methods, default arguments, and more standard library types including std::map and std::optional.

    C++ types that do not have a copy constructor can now be accessed from Swift 6 as non-copyable types with ~Copyable. And for those times when it’s useful to expose a C++ type with a copy constructor as ~Copyable in Swift for better performance, a new SWIFT_NONCOPYABLE annotation can be applied to the C++ type.

    Swift now also supports calls of C++ virtual methods on types annotated as SWIFT_SHARED_REFERENCE or SWIFT_IMMORTAL_REFERENCE.

    When calling C++ functions or methods that have default argument values for some of their parameters, Swift now respects these default values, rather than requiring you to explicitly pass an argument.

    Platform Support

    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.