[swift-evolution] No disjunctions in type constraints: why?

Robert Widmann devteam.codafi at gmail.com
Wed Jan 17 12:58:25 CST 2018

If you replace “conjunction” by “O(n) search with early-exit on failure” and “disjunction” by just “O(n) search”, you’ll see why this can lead to computationally painful systems of constraints.  Each disjunctive constraint may further contain or create disjunctions ad nauseum, each time incrementing the exponent in the worst-case time it takes to solve the system.  Introduction of disjunction into an already complex system (say, one that supports constrained parametric polymorphism and subtyping AND disjunctions through overloads) makes an already difficult problem even harder.

~Robert Widmann 

2018/01/13 4:45、Daryle Walker via swift-evolution <swift-evolution at swift.org>のメール:

> From <https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md#miscellaneous>.
> Maybe I’m not up on my Type Theory, but why should type constraint disjunctions be banned?
>> Daryle Walker
> Mac, Internet, and Video Game Junkie
> darylew AT mac DOT com 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20180117/33f90388/attachment.html>

More information about the swift-evolution mailing list