>> I believe you've made a mistake here, elem needs to be *T , not T This was just an abstract example. I just wanted to say that if someone want to try implement a transpiller of the "Go.next" to the "Go" then the better way to represent the data of the different types (which are specified by the type arguments) in parametrized types is to use "unsafe.Pointer's".
Eg type slice struct { array unsafe.Pointer len int cap int } type sliceType struct { rtype elem *rtype } // arrayAt returns the i-th element of p, a C-array whose elements are // eltSize wide (in bytes).func arrayAt(p unsafe.Pointer, i int, eltSize uintptr) unsafe.Pointer { return unsafe.Pointer(uintptr(p) + uintptr(i)*eltSize) } This means that "unsafe.Pointer's" used everywhere for represent data of any kind. That's all I want to say. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.