Agreed. This is where I point to generics as "a standard way we express typed programs" and express some ambivalence. Perhaps a bit like my ambivalence over (say) lambdas. They work, but it seems they introduce a lot of room for mismatched meanings.
I agree with this model, but do you agree that you first have to mentally instantiate the function with types before you can mentally instantiate it with parameters?
-
-
Only if you need to typecheck the function (perhaps if you need to do that in order to figure out what the function does in the first place because static types determine runtime behavior).
-
an earlier sub-thread in this chain stated (without objection) that a mismatch between parameter and existential intuitions is the source of problems. Did I misunderstand that? Can you elaborate?
-
The existential intuition is wrong, just like lots of wrong intuitions about functions are wrong. I think you said that people use the existential intuition because it's simpler, but I disagree that it's simpler than the abstraction intuition I described.
-
I actually literally don't understand the existential model people apparently have...
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.