Comment by refulgentis

6 days ago

> Swift is strictly better in OO support and C++ interop

Fascinating.

They've shown the idea it is better on C++ interop is wrong.

I don't know enough to say Rust has same OO support as Swift, but I'm pretty sure it does. (my guess as a former Swift dev: "protocol oriented programming" was a buzzy thing that would have sounded novel, but amounted to "use traits" in rust parlance)

EDIT: Happy to hear a reply re: why downvotes, -3 is a little wild, given current replies don't raise any issues.

Rust has straightforward support for every part of OOP other than implementation inheritance, and even implementation inheritance can be rephrased elegantly as the generic typestate pattern. (The two are effectively one and the same; if anything, generic typestate is likely more general.)

  • > Rust has straightforward support for every part of OOP other than implementation inheritance

    Except the only thing that makes OOP OOP: Message passing.

    Granted, Swift only just barely supports it, and only for the sake of interop with Objective-C. Still, Swift has better OO support because of it. Rust doesn't even try.

    Not that OOP is much of a goal. There is likely good reason why Smalltalk, Objective-C, and Ruby are really the only OOP languages in existence (some esoteric language nobody has ever heard of notwithstanding).

  • I think we have seen enough since the best example of a Rust browser that is Servo, has taken them 14 years to reach v0.0.1.

    So the approach of having a new language that requires a full rewrite (even with an LLM) is still a bad approach.

    Fil-C likely can do the job without a massive rewrite and achieving safety for C and C++.

    Job done.

    EDIT: The authors of Ladybird have already dismissed using Rust, and with Servo progressing at a slow pace it clearly shows that Ladybird authors do not want something like that to happen to the project.

    • Until just a couple years ago, Servo had been a pure research project with no goal of ever releasing a full browser (and it was abandoned by Mozilla in 2020).

      Igalia had five engineers working full time who turned that science project into v0.0.1 in less than two years.

    • > Fil-C likely can do the job without a massive rewrite and achieving safety for C and C++.

      So long as you don't mind a 2-4x performance & memory usage cost.

    • The RUST ecosystem barely just started getting into shape on the GUI toolkits frontend... So perhaps save your criticisms for something that wasn't born out of the vacuum.

    • > Fil-C likely can do the job

      > Job done.

      Seems like you forgot a few stops in your train of thought, Speed Racer.

They demonstrated that swift's c++ interop isn't good enough, but does it follow that rust's is better? Genuinely asking, as I don't have experience with that. I would imagine that if they rejected it for that reason originally they forsaw even more severe issues.