My experience is that mostly people who want their simple program to type check are asking for either significantly greater type system complexity or to be able to ignore some aspect of the underlying language (such as concurrency or mutability).
-
-
I think I (maybe like
@ubsanitizer) don't understand the mental model you're describing. I think about (and teach) type parameterization as a precise analogue of function parameterization. You have two similar things (functions, type defs), and you abstract by adding a parameter. -
Right, that's my mental model of type parameters. I know functions are really hard to "get" before you have the intuition; I imagine type parameters are the same way.
-
(but once you have that intuition, then you're fine)
-
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 -
-
-
I don't understand what you're saying in these replies.
-
It doesn't feel related to what I was saying?
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.