The feedback was not specific to the "SumIntsOrFloats" example in the tutorial. The tutorial fails to demonstrate any generic data structures utilizing the "[T any]" constraint or a function with an 'any' constraint, such as "slices.Clone[S ~[]E, E any](s S) S". This omission is notable considering "any" is among the most frequently used constraints in writing generic code.
On Thursday 22 February 2024 at 09:10:30 UTC+1 Kurtis Rader wrote: I don't understand your feedback. How, exactly, should generics handle the `any` type? Documentation can always be improved but how would a generic function that accepts two `any` types perform addition of those "any" values? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c9c9e11b-9bf8-4ffd-b75e-ebb491962d63n%40googlegroups.com.