As you may have heard, a few days ago Google released
a new programming language that they'd been developing for awhile. And by "they", I mean Rob Pike and Ken Thompson, both of whom were instrumental in the creation of Unix, its predecessors, and its successor. They also invented UTF-8. So, you know, there's some reason to pay attention.
As it
(
Read more... )
Comments 5
Reply
I did hit precisely the same problem as you as regards declarations - the syntax looks superficially C-like-enough that it confused me into making the wrong inferences about the structure.
Reply
Go does have an FFI, however, it isn't well documented (at all). There's example code here: http://code.google.com/p/go/source/browse/misc/cgo/gmp/gmp.go?r=release
though.
Reply
Reply
I wrote one function that enumerates all the fields of a struct you pass it, and another that takes a pointer to an object that has a "Gold uint16" field and force-sets that field to 9999. I suspect for a less contrived application type-switching will come in more handy.
Reply
Leave a comment