On Tue, Jul 1, 2014 at 6:44 PM, Jonathan S. Shapiro <[email protected]> wrote:
> it turns out
> that the "X as Y" expression isn't syntactic sugar, because a base
> class/interface designer cannot enumerate all potential derived
> class/interface types.

But then you can't enumerate the guard type for all potential derived
types, so it seems like the real question is again whether to use
wrapping or just an interface. (Where the latter would have checked
downcast.) Unless you meant to demand the same guard for any downcast,
which would provide some middle-ground.

> So for the downcast case, what I'm really proposing
> is that "x:X as Y" requires both "dynamictypeof(x) <=: Y" and also
> "X.canDownCast() = true".

I like having a flag for whether an interface is "dynamically
abstract" or not, but is it right for that to be a method? Why on
earth would you want that to be determined at runtime? If possible,
I'd like a keyword or something even better.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to