2 ms·
> I'm not sure why is everybody so after C++ Not everybody; those who have tons and tons of existing C/C++ code, want to move away from it, and realize the onl
by Someone 3y ago
> I'm not sure why is everybody so after C++
Not everybody; those who have tons and tons of existing C/C++ code, want to move away from it, and realize the only way to do that is gradually.
Swift’s C++ interop makes it possible to add a Swift class to an existing C++ code base and have code from either language call into the other, mostly without having to copy or convert function arguments.
You can write Swift functions that work with C++ std::string today, for example, gradually replace all code using it by Swift code, and then change the type of the value to Swift’s string. Easy? No, but easier than a ‘big bang’ rewrite.