rust reaction to walter's talk on interfacing to C++

Laeeth Isharc via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 22 01:52:23 PDT 2016


https://internals.rust-lang.org/t/interfacing-d-to-legacy-c-code-a-summary-of-a-competing-languages-capabilities/1406/3
from > a year back, but I didn't see it mentioned here before.

"
Personal thoughts for Rust:

     This could be a killer feature for D. As far as I know, no 
language (which doesn't just translate to C++) supports C++ 
interfacing in any non-insane manner. It would significantly 
reduce the barrier to incrementally replacing C++ with D code. I 
believe that if Rust wants to compete in this space, matching D's 
capabilities here would be of considerable value.
     Rust is not as well-off as D in some areas: D has the 
advantage of its template system actually being a superset of 
C++'s. It also has conventional OO features. Finally, it has a 
several-year head start.
     Rust has two advantages I can think of: it doesn't have the 
struct/class split that D does, and it has non-transitive *mut 
and *const (at least, I don't think they're transitive in Rust).
     This isn't a question of all-or-nothing. Clearly, interfacing 
with any possible C++ code is just complete lunacy. D has thus 
far demonstrated that there's a decently-sized proportion of C++ 
code that can be bound to without needing to integrate a full C++ 
compiler.
     With the Servo team looking to start adding components 
written in Rust into Firefox, might be an excellent opportunity 
to look at exactly what features would be most useful.
"



More information about the Digitalmars-d mailing list