News for hackers. Stuff that matters.
Re:Go generics draft design: building a hashtable by OceanSpray on Wednesday June 17, 2020 @11:21PM (#23559490)
Without generics, sum types would have to be a built-in like maps and arrays.

With generics, discriminated unions can take on all sorts of user-defined shapes.

Re:Go generics draft design: building a hashtable by kccqzy on Thursday June 18, 2020 @03:13AM (#23560571)
Without generics, structs can take on all sorts of user-defined shapes. It's just that the types of its fields are fixed at declaration.

Without generics but with sum types, the sum types can still take on all sorts of user-defined shapes. It's just that the types of its various alternatives are fixed at declaration.