News for hackers. Stuff that matters.
Re:Rust's 2017 roadmap, six months in by shmerl on Wednesday July 05, 2017 @05:06PM (#14706108)
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++.
Re:Rust's 2017 roadmap, six months in by pcwalton on Wednesday July 05, 2017 @05:22PM (#14706216)
Name mangling is almost completely a non-issue. We solved it years ago for the Servo SpiderMonkey bindings, to name one instance.
Re:Rust's 2017 roadmap, six months in by shmerl on Wednesday July 05, 2017 @05:29PM (#14706276)
What is the most difficult part for Qt then? Translating some of its concepts in Rust?
Re:Rust's 2017 roadmap, six months in by civilitty on Wednesday July 05, 2017 @06:20PM (#14706573)
AFAICT, 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.
Re:Rust's 2017 roadmap, six months in by dagmx on Thursday July 06, 2017 @12:01AM (#14708043)
Rust 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.

Re:Rust's 2017 roadmap, six months in by Rusky on Wednesday July 05, 2017 @05:10PM (#14706130)
Name mangling is by far the easiest part. It's already solved via bindgen and clang.
Re:Rust's 2017 roadmap, six months in by vvanders on Wednesday July 05, 2017 @05:53PM (#14706413)
That only works for clang based static/dyn libs though right? If I remember correctly msvc has a different set of mangling.
Re:Rust's 2017 roadmap, six months in by mwu on Wednesday July 05, 2017 @06:22PM (#14706587)
Clang also supports MSVC mangling. I've never tried it with bindgen, but it can be done.
Re:Rust's 2017 roadmap, six months in by vvanders on Wednesday July 05, 2017 @08:02PM (#14707199)
Huh, nifty. Learn something new every day, thanks!
Re:Rust's 2017 roadmap, six months in by Rusky on Wednesday July 05, 2017 @08:03PM (#14707203)
Clang supports MSVC manglings and bindgen correctly exposes them.