A deep dive into porting Go's io package to C, covering the key design challenges: representing Go slices as C structs, handling multiple return values via result structs and unions, modeling sentinel errors as pointer-comparable structs, and implementing Go interfaces using fat structs with function pointers. The post also
Table of contents
The io packageSlicesMultiple returnsErrorsInterfacesType assertionSpecialized readersCopyWrapping upSort: