[swift-evolution] [Proposal] Higher Kinded Types (Monads, Functors, etc.)

Jens Persson jens at bitcycle.com
Thu Dec 17 08:25:11 CST 2015


This is directed to the thread/discussion in general, not any specific
person: I think it was said before but it is probably worth
repeating: Whether the type system should allow HKT or not doesn't
necessarily have anything to do with the names and data structures of
the stdlib.

For example, a Mappable protocol (let's call it that rather
than Functor) is currently not even _possible_ to write, and I believe this
is the question to consider, i.e. whether Swift's type system should be
allowed to express types that are parameterized not only by concrete types
but also by parameterized types, for example if a return type could
be Self<T> or just Self.

It would be sad if the question about HKT turned into yet another fruitless
and meaningless functional vs imperative debate (see the talk *-Oriented
Programming by Graham Lee).

/Jens

On Thursday, December 17, 2015, Will Fancher via swift-evolution <
swift-evolution at swift.org> wrote:

> I'm not sure I follow? Are you suggesting that having HKTs at all will
> encourage Swift programmers to use bad naming conventions? I don't think
> the two are related unless you're talking about people using a Monad
> library, in which case it will be the Monad library using and encouraging
> bad naming conventions, not HKTs themselves.
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org <javascript:;>
> https://lists.swift.org/mailman/listinfo/swift-evolution
>


-- 
bitCycle AB | Smedjegatan 12 | 742 32 Östhammar | Sweden
http://www.bitcycle.com/
Phone: +46-73-753 24 62
E-mail: jens at bitcycle.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151217/1dc06b8a/attachment.html>


More information about the swift-evolution mailing list