5 ms·
I have no idea what they will specifically say regarding calling C from Go, but the table of contents says that part is only going to be about five pages. I re
by claystu 11y ago
I have no idea what they will specifically say regarding calling C from Go, but the table of contents says that part is only going to be about five pages.
I really wish they would beef up this portion of the book.
- harikb 11y agoThe fact that it is a bit non-intuitive to call C from Go is exactly where there are so many 'Pure Go' libraries. I consider this as a short-term hurdle with long-term benefit.
- claystu 11y agoIt would be nice if all C libraries get rewritten in Go, but realistically, there are way too many for that to ever happen.
- skybrian 11y agoThere are lots of libraries in C (and Java) but the question is which ones are essential for whatever you're trying to do? There are lots of Go programs you can write just using the standard library. That appeals to me since I'm generally in favor of avoiding unnecessary dependencies. But if you need it, you need it.
- TillE 11y agoIt really depends on what you're doing, but even in common obvious stuff like networking, there can be functionality in libcurl or OpenSSL that you really need but isn't replicated in Go. Several years ago I remember trying to do SSL certificate verification with Python and finding the standard library lacking. Also bear in mind that good compatibility with C also means good compatibility with just about every other compiled language, including Rust.