Re:On Go
by kodablah on Sunday June 02, 2013 @12:38AM
(#5807332)
My biggest issues with Go are compatibilities with the C ABI and the lack of shared library support. I have not looked in a while, so I may be wrong, but here are my big questions: 1. Can C invoke a Go-compiled and exported callback/function? 2. Can I build a Go .so/.dll invokable via C or other non-Go FFI methods? 3. If I build a commercial Go lib for others to link with, how can I distribute it without distributing the Go source?
[ Parent
| on HN ]
I suspect unless someone gets real exciting about this and modifies one of the toolchains, this won't happen in the near future. You can do (1) with some ugly syntax. Regarding (2) and (3) -- I know some projects are happening in both those spaces, but haven't kept up with them.
As far as I know, you can call from C(++) into go, as long as the outermost layer (main) is go.
In fact all three of those things are being worked on, or planned for the medium term.