2 ms·
All of those are for non native code to call code in those languages. Nobody is saying "all Go code must never invoke native code". That would be wild and to my
by bastawhiz 13d ago
All of those are for non native code to call code in those languages. Nobody is saying "all Go code must never invoke native code". That would be wild and to my knowledge, there's no major language that forces such a constraint.
- pjmlp 12d agoAll the languages I mentioned compile to native code.
- bastawhiz 12d agoI can't tell if you're being willfully ignorant or not. The comment I was replying to was proposing banning C extensions: invoking native binaries that are not written in the host language and compiled in (at build or runtime). What you're describing has nothing to do with that.
- pjmlp 12d agoWhy would a Go binary (to keep the examples short), compiled to native code, with a compiler toolchain that includes support for Assembly if necessary, and a syscall package as well, have to depend on C extensions? CGO only exists as a matter of convenience.