Erik Engheim
1 min readDec 23, 2022

--

Not the same thing. If you had used Objective-C and then Swift you would have understood what Carbon is about.

Swift was specifically designed to replace Objective-C. Apple had tried before with things like Java, but it didn't work. Why? Because they couldn't make Java call Objective-C code?

No, they managed to do that but it was always clunky. Same think with Rust. Rust was never designed as a drop-in replacement for C++ and thus interfacing with C++ will always be clunky.

The concept of inheritance doesn't exist in Rust. The way memory is managed is not the same. You would always need to make a semantic translation.

Wrappers are very rarely any good in my experience. But when two languages share the same underlying model in terms of memory layout, runtime etc, it becomes so much smoother.

Porting Objective-C code to Swift was way easier than it would have been to port to Rust for instance even if Rust can do a FFI.

--

--

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

Responses (1)