[swift-evolution] Code Contracts
davesweeris at mac.com
davesweeris at mac.com
Thu Jan 14 23:53:22 CST 2016
This is the same thing as Refinement Types, right?
https://en.wikipedia.org/wiki/Refinement_(computing)#Refinement_types
http://goto.ucsd.edu/~rjhala/liquid/haskell/blog/blog/2013/01/01/refinement-types-101.lhs/
I’m in favor of it, but I think someone’s already made that suggestion… At the very least, I didn’t know what the phrase meant until a few days ago, and I know I learned about it from reading something on swift-evolution.
- Dave Sweeris
> On Jan 14, 2016, at 20:32, Suminda Dharmasena via swift-evolution <swift-evolution at swift.org> wrote:
>
> E.g.
>
> var @where("myVariable <= 100 && myVariable >= 0") myVariable = 42
>
>
> @where("myVariable <= 80 && myVariable >= 50")
> {
> ...
> }
>
>
> @where("score <= 100 && score >= 0")
> for score in individualScores {
> ...
> }
> _______________________________________________
> 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/20160114/4581f3b2/attachment.html>
More information about the swift-evolution
mailing list