4 ms·
I mean, that's golang for you. While many other languages are plagued with NIH (I love rust, but it's very much guilty of this, often to avoid having to deal wi
by ComputerGuru 4y ago
I mean, that's golang for you. While many other languages are plagued with NIH (I love rust, but it's very much guilty of this, often to avoid having to deal with non-native dependencies) they at least give you a feasible option of FFI while go is truly allergic to it.
- dpifke 4y agoWhy do you think CGo is not feasible?
- bdhcuidbebe 4y agoFFI overhead
- enneff 4y agoNot really? A cgo wrapper for SQLite is by far the most popular way to use SQLite in Go and it works great. But I think it’s a major design error to use FFI for a thin client library. You’re bringing in a whole other network stack for what should be some simple serialisation/deserialisation. Plus even if you were, say, linking against libmysql you’d still have a bunch of wrapper code to make it a nice API in whatever the host language may be. Not worth it.