4 ms·
Swift and Objective-C share a memory model, though, which Rust does not. I suspect that any Rust code that interoperates with Objective-C will never be "cleaner
by saagarjha 6y ago
Swift and Objective-C share a memory model, though, which Rust does not. I suspect that any Rust code that interoperates with Objective-C will never be "cleaner" than the corresponding Swift code.
- adamnemecek 6y agoSwift selectively shares the objc memory model.
- Klonoar 6y agoI mean, it depends on the Swift code you write - basic example which could be done fairly closely: https://github.com/ryanmcgrath/cacao/blob/trunk/examples/autolayout.rs https://github.com/ryanmcgrath/cacao/blob/trunk/examples/aut... Having written my fair share of both languages, I don't think they're as far apart as people think... yet, anyway. I doubt my response will age well.
- fiddlerwoaroof 6y agoI’ve had some pretty good luck integrating Common Lisp and the Objective-C runtime: the difference of memory models isn’t a huge problem, as long as there’s a nice way to map between them.