On 21/07/2014 1:00 pm, "Jonathan S. Shapiro" <[email protected]> wrote:
>
> On Wed, Jul 16, 2014 at 2:12 PM, Matt Rice <[email protected]> wrote:
>>
>> I think the best argument for it I have come up with is something like
>> the following scenerio:
>>
>> we have a structure Triangle {pt1; pt2; pt3;}
>> we have a structure much like a subtyping relationship with restricted
values
>> structure RightTriangle {pt1; pt2; pt3} where one of the angles must
>> be 90 degrees, and for whatever reason we wish not to make
>> RightTriangle opaque, to avoid the indirection of accessor functions
>> for the values,
>
>
> OK. This is an interesting example. The example itself is clearly
contrived, but it illustrates a problem that actually does arise in
practice, which is data structure instances that meet some interesting
constraint. In this case the right-angle constraint.
>
> 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.

There seems to be a lot of literature in that area; it seems it will take a
while before I have even a feeling for what will scale and what will be
pleasant.

>
> shap
>
> _______________________________________________
> bitc-dev mailing list
> [email protected]
> http://www.coyotos.org/mailman/listinfo/bitc-dev
>
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to