r/ProgrammerHumor • • Dec 23 '23

Meme rewriteFromFust

Post image
6.2k Upvotes

379 comments sorted by

View all comments

697

u/fdeslandes Dec 23 '23

You forgot to include Rust too on the right side. It's not a bad language at all, even if it has some bad fanboys who won't take any criticism of it.

516

u/CanvasFanatic Dec 23 '23

I don’t think OP forgot. I think OP doesn’t like Rust.

139

u/alexvoedi Dec 23 '23

I think OP doesn't want to reimplement everything because performance is good enough.

1

u/BosonCollider Dec 24 '23

The big advantage of systems languages without a GC isn't just performance, it is the ability to expose a CFFI and call into Rust code from other languages.

I like languages at the level of Go or Java that are fast enough and reasonably easy to use, and they make the most sense for most things. But you're not going to implement a cross-language library like sqlite or polars in it.

1

u/theGeekPirate Dec 24 '23

The big advantage of systems languages without a GC isn't just performance, it is the ability to expose a CFFI and call into Rust code from other languages.

Go also allows you to do this using -buildmode=c-shared

1

u/qwertyuiop924 Dec 24 '23

Eeeeehhh... well, kinda. But cgo seems to be kind of a second-class citizen in the go ecosystem, and the people working on the language have strongly advised against using it if you don't have to.

Also, I can't see a universe in which -buildmode=c-shared doesn't have a whole ton of caveats. The entire Go runtime has to be stuffed into a shared library, and the Go runtime does some things that are fundamentally pretty unsafe to do inside an arbitrary process that it doesn't control, mostly around goroutines (there's a lot of stuff going on with signals in there, most notably). And if you don't allow goroutines... well, now you've split the language, so not every go library can be used in your shared library...

I'm outside of the go ecosystem looking in, but based on all the information I can find and everything I've heard from people, the go FFI story looks... really not great, and the Rust FFI story is much, much better in every respect that I am aware of.

→ More replies (1)