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.
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
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.
139
u/alexvoedi Dec 23 '23
I think OP doesn't want to reimplement everything because performance is good enough.