WWDC_NewsInSwift

Meqt

Tune low-level performance

Is Swift Getting Rusty?

C++ Interoperability

This topic is greatly interconnectted with the topic above.

Incremental Swift adoption.

Remove Objective-C Bridging for C++ libraries.

No overhead?

Imported Cxx std::vector -> Swift std.vector short lifetime, and deep copy( unlike swift Array), copy constructor and destructor to manage lifetime.

Reference Semantics.
SWIFT_SHARED_REFERENCE(retain, release)

1
#import <swift/bridging>

Macros

Swift-DocC

API

1
2
3
func query<FirstPayload, each Payload>(_ first: Request<FirstPayload>, _ item: repeat Request<each Payload>) -> (FirstPayload, repeat each Payload) where FirstPayload: Equatable, repeat each Payload: Equatable {
return ( repeat (each item).evaluate() )
}
  • Post title:WWDC_NewsInSwift
  • Post author:Meqt
  • Create time:2023-06-15 13:13:00
  • Post link:https://meqtmac.github.io/2023/06/15/WWDC-NewsInSwift/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.