Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is a higher kinded type in Scala?
    primarykey
    data
    text
    <p>You can find the following on the web:</p> <ol> <li><p><strong>Higher kinded type == type constructor?</strong></p> <blockquote> <pre class="lang-scala prettyprint-override"><code>class AClass[T]{...} // For example, class List[T] </code></pre> </blockquote> <p>Some say this is a higher kinded type, because it abstracts over types which would be compliant with the definition.</p> <blockquote> <p><em>Higher kinded types</em> are types which take other types and construct a new type</p> </blockquote> <p>These though are also known as <em>type constructor</em>. (For example, in <a href="http://www.artima.com/pins1ed/type-parameterization.html#19.3">Programming in Scala</a>).</p></li> <li><p><strong>Higher kinded type == type constructor which takes type constructor as a type parameter?</strong></p> <p>In the paper <a href="http://adriaanm.github.com/files/higher.pdf">Generics of a Higher Kind</a>, you can read</p> <blockquote> <p>... types that abstract over types that abstract over types ('higher-kinded types') ..."</p> </blockquote> <p>which suggests that</p> <blockquote> <pre class="lang-scala prettyprint-override"><code>class XClass[M[T]]{...} // or trait YTrait[N[_]]{...} // e.g. trait Functor[F[_]] </code></pre> </blockquote> <p>is a higher kinded type.</p></li> </ol> <p>So with this in mind, it is difficult to distinguish between <em>type constructor</em>, <em>higher kinded type</em> and <em>type constructor which takes type constructors as type parameter</em>, therefore the question above.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload