Hacker News new | ask | show | jobs
by mustpax 4365 days 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.

1 comments

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