On Sun, Jul 20, 2014 at 11:06 PM, William ML Leslie
<[email protected]> wrote:
> On 21/07/2014 1:00 pm, "Jonathan S. Shapiro" <[email protected]> wrote:
>> This can be viewed as type, or it can be viewed as a known constraint on a
>> value of some type. How do we want to think about this case?
>>
>> Incidentally, this is the kind of think that preconditions,
>> postconditions, and assertions deal with quite well.
>
> I think this is what Matt means by Curry types.

Yes, more or less. As Shap pointed out, you could also think of a
right triangle as a different type, where you'd need to convert or
cast from a right triangle to a (not-necessarily-right) triangle. But
it seems more natural to me in this case to think of it as a
refinement of the existing triangle type with a constraint/invariant,
which is indeed what I mean by a Curry-style type.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to