What English word would you use to describe a particular example of a type constructor, in the sense that `List[Int]` and `List[String]` are examples of `List`s? I'd like to avoid calling them "examples" if possible.
-
Show this thread
-
This question arose because we can talk about `List`'s type parameter being "instantiated" (that is, decided during typechecking) to `Int` or `String`, but saying `List[Int]` is an instance of a type is problematic because it implies the creation of a new heap object.
1 reply 0 retweets 0 likesShow this thread -
So while "List[Int] is an instance of a List" is correct in a certain context, I don't want to confuse my readers by assuming they have precisely that context and not a slightly different one. Any ideas?
19 replies 0 retweets 0 likesShow this thread -
Replying to @propensive
List is a generic type and List[int] and List[String] are concretions of this generic. List[Int] are concrete (instantiable) types and List is not.
1 reply 0 retweets 1 like -
Replying to @babui_
It feels a little bit... forced, but "concrete" seems to be a word that doesn't sound good when it's transformed. :( I'm calling instantiable types "proper types", by the way (though IIRC I mention the word "instantiable" when explaining them).
2 replies 0 retweets 0 likes -
Replying to @propensive @babui_
‘Concrete type’ is correct, check out the Haskell wiki
1 reply 0 retweets 0 likes -
Replying to @yawaramin @babui_
I would make the distinction between a proper type such as `List[A]` and a concrete (and proper) type such as `List[Int]`, though. I don't consider `List[A]` to be concrete, though... but I don't think I got this from any textbook, so I might be being loose with definitions...
2 replies 0 retweets 0 likes -
Replying to @propensive @babui_
Technically, I think List[A] is: forall A. List[A] So a universally quantified type
1 reply 0 retweets 1 like -
Replying to @yawaramin @babui_
Yes, universally quantified... but to a type that tells us almost nothing about it. It's no wonder people find this complicated. ;)
1 reply 0 retweets 0 likes
There's also the concept of habitation (or at least a type being uninhabited), which doesn't stop it being proper, improper, concrete, abstract, existential or universal...
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.