4 ms·
I had no idea Haskell used 'kind' to refer to something codified and concrete in this way -- usually we see the word 'type' used to refer to the concrete type-s
by MaxBarraclough 8y ago
I had no idea Haskell used 'kind' to refer to something codified and concrete in this way -- usually we see the word 'type' used to refer to the concrete type-systems stuff, and 'kind' to refer to the fuzzier, less precise idea of, uh, what it is the data is.
Type theorists say things like "Type systems let us reify what kind of data we are dealing with".
It's a bit like when Java took the fuzzy term 'interface' and made it a concrete technical concept, or when Apple added closures to Objective-C and called them 'blocks', which was previously a fuzzy term.
Will we have to start using another word to refer to the fuzzier concept, if not 'kind'? 'Sort' is already taken. 'Category' is already taken. Perhaps the 'nature' of the data?
- lmm 8y agoKinds are a distinct concept from types, and that concept needs a name, and it's best to choose a name where the intuitive meaning of the name aligns with the technical one (indeed Haskell attracts a lot of criticism when it uses names like "monad" that don't have a "fuzzy" meaning). It goes even further: types-of-kinds are called "sorts", though in Haskell there's only one possible sort of kind. There are only two hard problems in computer science, after all.
- jacobush 8y agoNaming and ?? (Computability?)
- hiker 8y ago"There are only two hard things in Computer Science: cache invalidation and naming things." -- Phil Karlton But I do like "Computability and naming things" better.
- gpderetta 8y agoThere are only two hard things in Computer Science: cache invalidation, naming things and off by one errors. -- Anonymous
- Intermernet 8y ago>There are only two hard problems in computer science, after all. Including off-by-one errors, there are four.
- MaxBarraclough 8y agoMaybe we should add 'induction' to the list.
- hiker 8y agoGoing further one will need a word for "the kind of a kind", "the kind of a kind of a kind" and so on. One solution is TypeInType, that is the type of a type is another type (not kind or something else). That's where Haskell is going with the work of adding Dependent Types to the language. The problem with TypeInType is that it is logically inconsistent - it leads to Girard's paradox, analog to Russel's paradox in set theory. The correct solution is type universes where every type lives in some type universe indexed by a natural number. For example terms are of type 'Type 1', 'Type 1' types are of type 'Type 2' and so on. The usual 'Type' is then just the first universe level 'Type 1' and 'Kind' is 'Type 2'. Type universes is what most proof assistants employ, e.g. Agda, Coq, Lean. Idris uses TypeInType which is easier to use and there's no need to massage your program until all type universes type check but is logically inconsistent so one has to be careful to not reproduce Girard's paradox in some form or another.
- mlazos 8y agoactually I’ve seen sort used for kinds of kinds in some PL papers that I’ve read. Not sure how official it is, some PL researchers I’ve talked to say that they don’t go higher than sorts.
- kccqzy 8y agoAre you just saying you don't like the term "kind" or something else? The name has been used since the last century.
- MaxBarraclough 8y agoI suppose I wasn't clear. In my experience, in computer science, "kind" is generally used in an informal way, whereas "type" is used to refer to the technical concept of type in type systems. If Haskell gives a precise meaning to "kind", I'm going to have be careful which word I use to refer to the informal concept. As I said, type theorists say things like "Type systems let us reify what kind of data we are dealing with".
- kccqzy 8y agoI see. I think it's fine to overload an English word to have both a precise meaning or an informal one.
- hiiq 8y agoObjective-C called closures blocks because that is what they are called in Smalltalk. Objective-C was modelled on Smalltalk.
- imh 8y agoThe same happens with all sorts of collectiony words. You could have a set of things, or a group of them, or a variety or a category or a kind or a sort or a class or type. We're running out of collection words without formal definitions!