Talk:Kind (type theory)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Mathematics (Rated Start-class, Low-importance)
WikiProject Mathematics
This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Mathematics rating:
Start Class
Low Importance
 Field: Foundations, logic, and set theory
WikiProject Computer science (Rated Start-class)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 

Data type[edit]

I don't like the use of data types here because they include function types. Proper types as Pierce uses is a less dubious terminology. Pcap ping 23:29, 19 August 2009 (UTC)

Haskell list example is really bad[edit]

because [] is also the empty list which has kind *. Pcap ping 00:48, 20 August 2009 (UTC)

When [] means the empty list, it's a value, which has type [a], which in its turn has kind *. You can't say the empty list has kind *. ShinNoNoir (talk) 17:07, 24 January 2010 (UTC)

Notation[edit]

I have replaced all occurrences \Rightarrow with \rightarrow. I believe it's better to use the original notation instead of substituting it for a different notation that has a meaning in Haskell as well. If a notation was to be changed for purposes of legibility, I would change one that isn't the primary point of discussion. --IncipienceThe (talk) 11:25, 23 July 2012 (UTC)

Commonality of higher-order type operators[edit]

In the standard library Phobos of the D language there are things like staticMap:

http://dlang.org/phobos/std_typetuple.html#staticMap

An usage example:

alias staticMap!(Unqual, int, const int, immutable int) T;
static assert(is(T == TypeTuple!(int, int, int)));

Where Unqual is a template that given a type removes from it all its outer modifiers, like const, immutable, pure, nothrow, @safe, shared, ecc.

staticMap has kind:

(* \rightarrow *) \rightarrow [*] \rightarrow [*]

Where [*] a built-in TypeTuple of D language.

Similar things are not uncommon in D programming and rather easy to implement. In Phobos I count about thirty uses of staticMap, so despite not being very commonly used, I can't agree such things are "very seldom encountered" as stated in the Examples section of this article. — Preceding unsigned comment added by 79.36.205.107 (talk) 01:09, 8 September 2012 (UTC)