That library (like this) claim “no cgo” when they use ffi is just ridiculous.
This one is particularly egregious in even supporting cgo!
Pure go my ass. You’re invoking c functions. It’s not pure go.
The distinction is in the tool chain; cgo is a better, first party solution.
Purego is an unstable (it is, read the repo!) workaround for people who a) don’t like the word “cgo” or b) dont like having a c tool chain.
…but realistically you have to interop with c code in many domains.
Sure, a pure world is great, but that’s not always possible.
People who don’t like cgo and choose purego are doing it for, mostly, optics (cgo is bad! This isn’t cgo… it’s ffi… totally different) and appear to fail to appreciate the technical distinction more complicated than they imagine, and they are still using c.
That library (like this) claim “no cgo” when they use ffi is just ridiculous.
This one is particularly egregious in even supporting cgo!
Pure go my ass. You’re invoking c functions. It’s not pure go.
The distinction is in the tool chain; cgo is a better, first party solution.
Purego is an unstable (it is, read the repo!) workaround for people who a) don’t like the word “cgo” or b) dont like having a c tool chain.
…but realistically you have to interop with c code in many domains.
Sure, a pure world is great, but that’s not always possible.
People who don’t like cgo and choose purego are doing it for, mostly, optics (cgo is bad! This isn’t cgo… it’s ffi… totally different) and appear to fail to appreciate the technical distinction more complicated than they imagine, and they are still using c.