On Thursday 22 February 2024 at 10:19:58 UTC+1 Jan Mercl wrote:
On Thu, Feb 22, 2024 at 10:06 AM 'Carla Pfaff' via golang-nuts
wrote:
> This omission is notable considering "any" is among the most frequently
used constraints in writing generic code.
Interesting to know, I'd naively guess th
On Thu, Feb 22, 2024 at 10:06 AM 'Carla Pfaff' via golang-nuts
wrote:
> This omission is notable considering "any" is among the most frequently used
> constraints in writing generic code.
Interesting to know, I'd naively guess the opposite. Can you please
share the source data set? Thank you.
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
conside
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?
On Thu, Feb 22, 2024 at 12:01 AM 'Carla Pfaff' via golang-nuts <
golang-
The Go documentation, available at https://go.dev/doc/, features only one
tutorial dedicated to generics, found at
https://go.dev/doc/tutorial/generics. This tutorial lacks any examples
employing the 'any' constraint, nor does it mention it. Instead, it begins
with the use of an 'int64 | float6