On Sat, Dec 27, 2014 at 3:02 PM, Matt Oliveri <[email protected]> wrote:

> On Sat, Dec 27, 2014 at 1:56 PM, Jonathan S. Shapiro <[email protected]>
> wrote:
>


> > def getX (ob : 'Ob) = ob.x
> > val getX : HasField('Ob, 'x :: Ident, 'fieldType) => 'Ob -> 'fieldType
> >
>
> Oh, no no no! "." is not pattern matching. It's projection. This is
> not a counterexample.
>

Point taken, and I appreciate the correction. But whether it's projection
or matching, hopefully you can see my illustration that it might be viewed
as inducing a constraint on the type of /ob/. To wit: you only look at ob.x
for those values ob that *have* an x field. :-)


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

Reply via email to