3 ms·
Isn't the C equivalent of a slice just a struct containing a *T, a length and a capacity?
by logicchains 12y ago
Isn't the C equivalent of a slice just a struct containing a *T, a length and a capacity?
- aktau 12y agoAnd some methods for manipulating it (slicing it), and reference counting. And macro's for automatically ref'ing/unref'ing.
- logicchains 12y agoReference counting? I didn't know reference counting was used with slices, I thought they just used the GC.
- aktau 12y agoYes, but since C is not a GC-language, I thought I'd add that to reach more equivalence :).