8 ms·
It's actually easier than you might think: Go has most of the capabilities of C, including calling C APIs like malloc/free etc and casting them to Go data types
by throwaway34241 5y ago
It's actually easier than you might think: Go has most of the capabilities of C, including calling C APIs like malloc/free etc and casting them to Go data types. Of course (like C) writing code in that way won't be particularly convenient or memory safe.
- messe 5y agoWell, yes and no. My concern was the fact that Go's escape analysis isn't always correct (although it's quite good), leading to variables that would be stack allocated in C/C++, being heap allocated in Go.