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_
Unless you want to explain kinds though, I don’t think it’s worth making fine-grained distinctions like that to learners
1 reply 0 retweets 0 likes
I will be explaining kinds later, so I want to set the right foundations for that to come. But you're right, these are all details that beginners shouldn't have to worry about.
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.