• Zamundaaa@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    8
    ·
    21 hours ago

    Mostly, a good library on C++ (Qt used to be one of those, but it’s started becoming annoying in the past few years) offers a lot of what Rust enforces at the language level.

    I like C++, but let’s not pretend that’s actually true. Qt is completely full of really unsafe APIs, most of them quite old by now. It certainly doesn’t offer anywhere close to any safety Rust provides.

    Even something as innocent as passing a pointer to Qt’s javascript engine can end up in use after free, and the signal+slot stuff goes wrong real fast once you do need multi threading.

    (which is not to single out Qt specifically, the STL has plenty of really stupid and unsafe APIs as well)