4 ms·
Swift 5.9 Brings a Macro System and C++ Interoperability
- trealira 3y agoNever used Swift, but I like the "consume" operator. It's like std::move from C++, except you get a compiler error, rather than C++'s policy of "moved-from objects shall be placed in a valid but unspecified state." It also reminds me of how, in early Rust, apparently move semantics were opt-in rather than the default.[1] Overall, Swift seems like an interesting language. It's also supposed to be a replacement for C, C++, and Objective-C for Apple. [1]: https://graydon2.dreamwidth.org/307291.html https://graydon2.dreamwidth.org/307291.html
- indigoabstract 3y agoI've used it very little so far compared to Objective-C, but I definitely like it much better, since I've never enjoyed programming in Objective-C. Up until this release, any cross platform C++ app had to use Objective-C as a bridge on macOS and iOS, but it looks like this will change from now on as Swift can now communicate with C++ also.