On 2 Mar 2015 04:10, "Matt Rice" <[email protected]> wrote:
>
> On Fri, Feb 27, 2015 at 5:21 AM, Keean Schupke <[email protected]> wrote:
> > The problem with casts is they can fail, even this :
> >
> > case t of
> >     (x :: X) -> ...
> >     otherwise -> ...
> >
> > Would be better, but I would prefer to constrain 't' to a type-class.
>
> I don't exactly see a cast there, in general since I apparently didn't
> make it clear the thought was that this would be implemented in the
> compiler, as part of a is_it_safe_cast_call_sandwich(sym,type), with
> the object header id being either the tag of a tagged union, or some
> form of type representation mechanism.

I guess there is some confusion here. What is an is it safe cast call? With
a case statement there is a clear failure path, are you suggesting failure
to cast is an exception?

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

Reply via email to