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

Regarding generic data structures, the author should consult the sort package, which has typed generics; much the same approach can be used for generic data structures.

More complex type inference requires a more complex (and hence buggier) compiler.

Finally, the author should investigate the unsafe package; I believe the following code will do what he wants:

  *(*byte)(unsafe.Pointer(uintptr(0x1234))) = 0xFF
Verbose? Sure.


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

Search: