6 ms·
That's true. It's not just GC actually. Slices and goroutines don't have a direct analogues in C either. But it is fairly easy to reason about the runtime compl
by mustpax 12y ago
That's true. It's not just GC actually. Slices and goroutines don't have a direct analogues in C either. But it is fairly easy to reason about the runtime complexity of these conveniences.
But like I said, if I didn't care about GC or concurrency, I'd be writing C.
- logicchains 12y agoIsn'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 :).