Comment on Ladybird Browser adopts Rust, with help from AI
XLE@piefed.social 21 hours ago
Is it a good sign for Rust code when it’s described as having “a strong ‘translated from C++’ vibe”? Or when the developer says too much Rust might be something they “can’t merge”?
eager_eagle@lemmy.world 18 hours ago
out of context?
that seems reasonable to me
XLE@piefed.social 17 hours ago
But is it a good idea to just translate something from C++ like that? It seems technically feasible but there’s something “off” about the whole thing.
Like the developer originally talked about switching to Swift, then decided not to switch to Swift.
And previously, “Ladybird devs have been very vocal about being ‘anti-rust’ (I guess more anti-hype, where Rust was the hype).”
Apparently you can translate C++ directly to Rust, but anecdotal statements claim that while Rust supports C++ conventions, you wouldn’t typically build a Rust app using them.
It all just suggests rudderlessness from the developers right now.
eager_eagle@lemmy.world 17 hours ago
Why it wouldn’t be? Surely not having idiomatic rust doesn’t eliminate other benefits of switching to the language, like better tooling, memory safety, and perhaps more people willing to contribute. Over time the codebase can be improved but the main goal in the transition seems to not break existing functionality, which they seem to have accomplished for LibJS.
CameronDev@programming.dev 11 hours ago
I haven’t looked at the code, but the mem safety may be out if the translation just slapped unsafe and transmute everywhere.
And “working code” is often very hard to replace, it can be hard to justify code changes when the original “works just the same”. So, I would expect the weird ported code to live on unless there is a major effort to rewrite it.
XLE@piefed.social 14 hours ago
I don’t think “why not” is a great response in general - especially when the same developer also invested time in Swift that was ultimately wasted.