2 ms·
If I could do SortSliceOfIntFunction := MakeIntSorter!(int) ...then I would not need generics to sort a slice of ints. I just generate code that I would have
by dagss 8y ago
If I could do
SortSliceOfIntFunction := MakeIntSorter!(int)
...then I would not need generics to sort a slice of ints. I just generate code that I would have written without generics to implememt the case for ints.
You need to instantiate for all cases you need manually... but today we are using go without generics entirely and it sort of works.
I agree it is not the same.