Rewriting Qt in Rust
-
@Pete-Carter said:
The whole point of me talking about this is to urge the Qt devs, who have great experience in GUIs, to build back better. If Qt keeps clinging to the old buggy tech, they will always face problems, and new, safer, hassle free, more productive frameworks will take over
I really don't get it. All this talk, multiple people giving you examples and counter arguments and you keep repeating the same tired slogans over and over, like some deranged mantra. Is there some Rust indoctrination course out there that repeats those silly talking points? Put down the Kool-Aid. It's just another immature language, like many of them out there. Wait a bit and it will have similar maturity problems to C++.
@SimonSchroeder I know this is a controversial opinion, but I don't get the whole fear mongering about using
new
. The only serious benefit of wrapping it inmake*
I know is related to exception safety, but I pretty much never use exceptions anyway (apart from the unavoidable std ones), so the benefit is really not there for me. What I would rather have is a user overridableqnew
or the like, so I could give Qt my custom allocator and track its memory allocations. It always pains me to have every byte in the app counted and budgeted, except for the unpredictable blob from Qt. It would be very difficult given all the 3rd party dependencies, but one can dream. -
its not worth it to port Qt to rust.
If something is written in c++, it doesn't mean its slow or bad. I personally had a really good experience with c++ AND rust. Qt would be suited with c++ really well. You're gonna shave off like 4ms of performance with rust. -
The suggestion should have been for Qt developers to start a side project written from scratch in Rust. There is no doubt Rust is much more safer, more productive and more modern than C++. It would be nice if Qt developers used their years of GUI experience to make something cool in Rust.
-
@Pete-Carter said in Rewriting Qt in Rust:
There is no doubt Rust is much more safer, more productive and more modern than C++.
There's quite a lot of doubt. And you will need to prove each of these assertions before there's "no doubt". Since you won't, probably because you can't, as there's no good evidence (anecdotes don't count), I'd rather say quite the opposite: there is a lot of doubt.
PS: "modern" isn't a feature, technical advantage or even a tangible or measurable property. Modern literally means more recent, which isn't a measure for anything relevant. Fads are always modern when they balloon, that doesn't make them good or desirable.
It would be nice if Qt developers used their years of GUI experience to make something cool in Rust.
Qt developers have many years (some decade or two) of experience writing C++, does that mean they are as experienced in Rust? Obviously not. Not to mention "GUI experience" means exactly nothing in the sense of programming, you don't write in "GUI", you satisfy a requirement for a user interface in a language (with an API).
-
@Pete-Carter Web development is not object oriented development.Most of the web devs have problems to grasp oop. You seems to have learned only the basis of those languages. therefore you cannot really compare c++ and Rust if you only have an overview of those languages.Normally in c++, memory management is handled by the developer.I hope you know at least the main concepts in c++ that involve memory management because that is the main point between Rust and c++.
-
@Pete-Carter said in Rewriting Qt in Rust:
It would be nice if Qt developers used their years of GUI experience to make something cool in Rust.
I recently heard that because of the borrow checker it would be really hard to write a GUI framework similar to Qt in Rust. Qt (and also many other C/C++ GUI frameworks) rely on sharing pointers to widgets to get anything done at all. I'm no Rust expert, but isn't this against the borrow checker? (Yes, there is a way around this, obviously, as there is already CXX-Qt.)
In that case it would be a lot nicer that non-Qt developers develop a GUI framework which is a lot more natural in Rust. This would mean inventing a new style of writing GUIs. Maybe it is time for a modern GUI framework instead of reshuffling the ideas of the 80s. (At least "more modern" was one of your reasons for Rust over C++.)
-
It would be nice if Qt developers used their years of GUI experience to make something cool in Rust.
There is Slint - a GUI framework written in Rust, created by Qt experts: https://slint.dev