News for hackers. Stuff that matters.
Re:I love coding in C by foldr on Thursday December 26, 2019 @01:31PM (#21885666)
>Like with generics the Go authors want to decide where and when these are used,

I wish this meme about Go and generics would die already. C allows you to define an array of int and and an array of char and have those be two different types. Go allows you to do this with slices and maps as well, because slices and maps are also built in types in Go. This is not "generics".

Re:I love coding in C by Nullabillity on Thursday December 26, 2019 @03:39PM (#21886570)
Yes, C has (very restricted) generics too. No, Go does not need to repeat all of C's mistakes.
Re:I love coding in C by foldr on Thursday December 26, 2019 @05:16PM (#21887305)
I think it's more useful to think of "generics" as applying to type systems that allow abstraction over types. C and Go crucially don't allow you to define a function that, say, appends an element of type T to an array of T. That's where things start to get complicated. C and Go don't have a restricted version of that [1] - they just don't have it at all.

[1] With the largely irrelevant exception of the C11 _Generic stuff.