top | item 47068521

(no title)

mlinksva | 12 days ago

https://x.com/awesomekling/status/1822236888188498031 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."

discuss

order

archargelod|11 days ago

Did they consider using Nim? It has great C++ interop, OO and same ARC memory management as in Swift.

ckcheng|12 days 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|12 days ago

Why not rust? It's popilar, in wide adoption, with wide support, without the baggage of C++. What'e the downside?

refulgentis|12 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.

zozbot234|12 days ago

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.)

f33d5173|11 days ago

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.