@odesa As somebody who doesn't speak Rust, this looks like a great mess.

To those who know, are all those things (datatypes?) equally relevant?

I get that some lines are there for the lolz, just like e.g. C/C++ also has a separate String class next to char *. I'm wondering where the joke begins and ends.

(I'm considering learning Rust.)

@floppy afaik, there are 2 main ways to represent string - vector and slice. so they are different variations of them ans is more like joke)

@floppy @odesa
There is some truth in the joke. But once you also show (char* buf; size_t buf_size; // careful, no '\0' termination) on the C side it becomes less funny ;-)

To reverse the joke, the left side lists all the possible API contracts a C function might expect the caller to follow for char*.

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.