2 ms·
Introducing generic types doesn't make the function-coloring problem go away. Now, instead of having a single function that has some effects, you have a family
by skybrian 6y ago
Introducing generic types doesn't make the function-coloring problem go away.
Now, instead of having a single function that has some effects, you have a family of closely-related functions, each with different effects. These functions are incompatible with each other. The function-coloring problem has gotten worse! :)
(Generic types are still useful though.)
- lalaithion 6y agoNo, it doesn't make it go away, but it makes the "function coloring problem" about as much a problem as the "colors" of functions as determined by their return types. You can't pass a `func () string` to an api accepting a `func () int`.