Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Isn't the whole point of a native Go/whatever version to avoid the interop penalty?

CGO require a c compiler (not always easy available) and make cross-compilation harder



Dumb question, on which system with a go compiler is a C compiler hard to install? Most *nix distros either come with gcc (and/ or clang) already or have it easily available as a package. AFAIK the same is applicable for MacOS with homebrew. Is this a problem for windows users or am I overlooking someone? I'm genuinly interested since I've recently started with Go and would like to use cgo in the future.


My primary use case is windows and embedded. Also sometimes while the compiler is easy to install, make c compilation work seamlessly across multiple machine with unreliable vendor toolchain or weird path issue where the compiler can't find the correct header/library are not that uncommon.


Thank you for your response and perspective. I didn't consider the various toolchains and environments from this POV. Your points make sense and are very helpful.


It also makes it harder to debug or do performance profiling. Or to manage builds in CI/CD.. there is a lot of cost to CGO.

I still would not rewrite SQLite. It's just too good how it is.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: