3 ms·
C also supports generics - just use void * !! no, Go doesnt' support generics.
by dirkg 7y ago
C also supports generics - just use void * !!
no, Go doesnt' support generics.
- takeda 7y agovoid * is the C's equivalent of interface {} it has little to do with generics although it can be used to work around lack of it. Perhaps there are other ways, but in C you have parametric polymorphism functionality through macros. That's why min() and max() are not functions but macros and they work with any type that can be compared, not just float64.