5 ms·
https://x.com/awesomekling/status/1822236888188498031 https://x.com/awesomekling/status/1822236888188498031 https://x.com/awesomekling/status/182223913803838268
by mlinksva 8mo ago
https://x.com/awesomekling/status/1822236888188498031 https://x.com/awesomekling/status/1822236888188498031
https://x.com/awesomekling/status/1822239138038382684 https://x.com/awesomekling/status/1822239138038382684
"In the end it came down to Swift vs Rust, and Swift is strictly better in OO support and C++ interop."
- refulgentis 8mo 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.
- zozbot234 8mo agoRust 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.)
- rvz 8mo agoI 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.
- tvshtr 8mo agoThe 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.
- josephg 8mo ago> 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.
- tomjakubowski 8mo agoUntil 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.
- satvikpendem 8mo agoServo was essentially integrated into Firefox. It was not a browser in itself until it was put into a foundation on its own.
- cztomsik 8mo agoOnly few isolated parts were integrated into Firefox, everything else was simply thrown away and abandoned, and IMO it was for a good reason. I've been programming in Rust for 5 years and I could barely understand the code in their repo. Not because it was somehow advanced but because it didn't make any sense. It felt like that with every decision they could make, they always chose the hardest way. On the other hand, I have never done any C++ (besides few tutorials) in my life and yet I found both Serenity/Ladybird and also WebKit to be very readable and understandable. BTW: If anyone wants to reply that Rust is different then yes, of course it is - but that's the point, if there is a language that maps nicely to your problem domain, it's also very fast, and well-understood then why the hell you'd use a language that is well-known to NOT map to OOP?
- bigyabai 8mo ago
- 9rx 8mo ago> 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).
- zozbot234 8mo agoYou just need to define a trait, then you can use dynamic dispatch.
- 9rx 8mo agoYou can, but then you don't get any of what OOP actually offers. Message passing isn't the same thing as dynamic dispatch. OOP is a very different paradigm.
- anonymars 8mo agoI think you are both unknowingly talking past each other: my understanding is that Smalltalk-style "object-oriented programming" ("everything is a message!") is quite distinct from C++/C#/Java/Rust "object-oriented programming" ("my structs have methods!")
- deleted 8mo ago[deleted]
- f33d5173 8mo agoThey 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.
- ckcheng 8mo ago> In the end it came down to Swift vs Rust, and Swift is strictly better in OO support and C++ interop Why not D?
- throwaway27448 8mo agoWhy not rust? It's popilar, in wide adoption, with wide support, without the baggage of C++. What'e the downside?
- user205738 8mo agoIt is not backward compatible, the library system is immature, and there is no variety of different compilers for the language.
- throwaway27448 8mo ago> the library system is immature Hoo boy, wait until you hear about the state of C++'s library "system"
- ckcheng 8mo agoWell they already chose Swift over Rust because they said: > Swift is strictly better in OO support and C++ interop So I guess from their point of view that’s why not rust. I don’t have a horse in the race. I was genuinely interested in why they didn’t even consider D given they already ruled out rust for those particular reasons, for which it seems D would fulfill nicely.
- archargelod 8mo agoDid they consider using Nim? It has great C++ interop, OO and same ARC memory management as in Swift.