[swift-evolution] [Proposal] Higher Kinded Types (Monads, Functors, etc.)
dgregor at apple.com
Wed Dec 16 17:49:08 CST 2015
> On Dec 16, 2015, at 2:40 PM, T.J. Usiyan <griotspeak at gmail.com> wrote:
> The ideal situation would involve being able to represent monad and being able to type alias the behavior that that would afford us 'for free' to specific named functions methods for our specific types, I think.
> The concrete example of a HKT's usefullness that I am after is captured here with [Causal Commutative Arrows](http://cs.yale.edu/c2/images/uploads/ICFP-CCA.pdf <http://cs.yale.edu/c2/images/uploads/ICFP-CCA.pdf>). I admit that the big win has to do with the compile time optimization afforded, but I will argue that the syntax's similarity to audio related pseudocode is just as big of a win. [These slides](http://static1.squarespace.com/static/53e04d59e4b0c0da377d20b1/t/541cb6eee4b0be37af62e23f/1411167982496/nichoiceICFP2014Presentation.pdf <http://static1.squarespace.com/static/53e04d59e4b0c0da377d20b1/t/541cb6eee4b0be37af62e23f/1411167982496/nichoiceICFP2014Presentation.pdf>) give a hint at what I am talking about. I agree that using "Monad" everywhere is not generally descriptive but I think that that is simply an issue of being able to document intent.
I’d just like to point out that I’ve been asking for concrete examples of how Swift programmers would benefit from higher-kinded types in their daily development, but I’ve received links to ICFP papers and lists of Haskell abstractions (Monad, Functor, Applicative) that only a type-theorist can understand. At best, this is a public-relations problem for higher-kinded types, because the vast majority of Swift developers—and also of members of this list—won’t be able to readily translate the content behind those links into “how does this improve my Swift code?” At worst, it’s a signal that this feature might not be of practical relevance to Swift, either because it solves problems Swift programmers don’t have or because it requires a thorough reading of TaPL to understand.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution