Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>As rsc has pointed out a few times, this problem is just a matter of someone doing the work to make it happen, not a fundamental limitation of the language itself.

Yes, but as neither he nor any other Go designer went ahead and did it the problem exists.



Why would you want do to it anyway? There isonly a handful programs/libraries that do not exist in C.

The only scenario I can think of is risk-minimizing managers. They allow a project to be done in Go but in case things don't work as expected, they don't want to be trapped in Go and be able to reuse that code from their favorite language.


You assume no new libraries will ever need to be written.


I assume those genuinly new libraries will take some time. Go is over 3 years old and yet there is hardly anything available for Go that is not available for other languages.

In fact the only things that come to my mind are vitess and Skynet - Terminator-future with Go. Being no expert in these areas, I bet there are C equalivalents that perform equally well. Also the vitess equivalent's implementation might be more complex in case it exists.


Because a library written in Go will only be useful in Go (a major shortcoming of Go) and Go can use C libraries, I suspect Go will not be used for library creation for the foreseeable future.


>Because a library written in Go will only be useful in Go (a major shortcoming of Go)

I claim that C, C++ and Java are the only languages whose libraries are heavily used from other languages. For other languages it's often better to interface via some kind of Network socket.

Surely there are Go libraries like there are Ruby libraries. But which C user seriously would want to interface a Ruby library?

Long story short: this is why Go code does not need to be called from C. :-) Different story in 5 years, in case Go is then sufficiently widespread.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: