On Mon, Jul 14, 2014 at 8:50 PM, Jonathan S. Shapiro <[email protected]> wrote:
> My personal inclination is that we shouldn't distinguish construction,
> because I haven't seen a real use case where opacity can usefully be
> partial.
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,
so we can wrap the constructor in a function which checks the angles
to restrict the type in some way that either the type system can not
prove, or the programmer is not smart enough to get the type system to
prove :)
the other uses I think resemble a generalization of Rob Meijer's raiicap
with guarded interfaces to the constructor instead of the usage of friend,
http://www.eros-os.org/pipermail/cap-talk/2014-April/016084.html
I'm not sure these really breach the "real use case" barrier, the
former we can live without if we want to, the latter is woefully
unexplored afaict
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev