7

I've heard Go is like C with channels and a lot of conveniences. I do very little C, but when I do it's to make small extensions to other languages. Can Go be a safe way to create extensions in other languages? Are people doing this?

Jonas
  • 121,568
  • 97
  • 310
  • 388
Jazz Man
  • 909
  • 7
  • 17
  • 2
    I think it boils down to interfacing with C code (specifically, making the Go compiler's output adhere to the platform's default ABI, or at least putting it behind a layer that does). I don't know enough Go to say if and how that can be done. But either way, it probably won't be easy enough (especially when you need to do it portably) to be an option for most people. –  Oct 23 '11 at 15:25
  • 2
    These might be helpful http://stackoverflow.com/questions/6125683/call-go-functions-from-c http://stackoverflow.com/questions/1760468/interface-go-with-c-libraries – nicerobot Oct 23 '11 at 16:25

2 Answers2

7

For Python there is goPy: https://github.com/qur/gopy

For Perl there is Campher: https://github.com/bradfitz/campher

For Lua there is golua: https://github.com/afitz/golua

uriel
  • 1,467
  • 13
  • 14
1

For PHP there are a few options:

Slava V
  • 16,686
  • 14
  • 60
  • 63