4 ms·
I think translation problems aren't caused by OOP itself, but by messed up name mangling, and total lack of any sane standard for it in C++.
by shmerl 9y ago
I think translation problems aren't caused by OOP itself, but by messed up name mangling, and total lack of any sane standard for it in C++.
- Rusky 9y agoName mangling is by far the easiest part. It's already solved via bindgen and clang.
- vvanders 9y agoThat only works for clang based static/dyn libs though right? If I remember correctly msvc has a different set of mangling.
- pcwalton 9y agoName mangling is almost completely a non-issue. We solved it years ago for the Servo SpiderMonkey bindings, to name one instance.
- shmerl 9y agoWhat is the most difficult part for Qt then? Translating some of its concepts in Rust?
- civilitty 9y agoAFAICT, QT has its own implementation of signals and slots (events and event handlers essentially) which is a pain for Rust's ownership model and it also has a code generator that deals with some of C++'s limitations, making it harder to generate usable bindings. If that weren't enough, there is no native (clean) Rust way to do C++ inheritance which is another big pain.
- dagmx 9y agoRust doesn't have a concept of inheritance and overriding which is a pretty key part of the qt design. If you are okay to use qt out of the box, there are a few bindings. But you won't be able to customise it like you would with actual qt.