By capsules you mean existential types? This is currently my preferred
method for runtime polymorphism, implemented using virtual functions on the
type-class.

I would be interested to know the problems with this as I like it as a
solution.

K.
 On 25 Feb 2015 15:56, "Jonathan S. Shapiro" <[email protected]> wrote:

> As I think we've discussed, I am planning to introduce subclassing (or
> something similar) and checked dynamic downcast into BitC.
>
> As much as I like qualified types, there are some problems that they do
> not handle. Sometimes you need to manage heterogeneous things under a
> single type.
>
> In abstract we could handle this with the "capsules" idea from BitC v0,
> but the capsule mechanism there tends to incur an allocation.
>
> First question: My understanding is that inference for bounded
> quantification is in general undecidable, but if we limit subtyping to
> nominal subclassing it remains decidable. Is this still the state of things?
>
> Second question: What else should I be considering as an alternative? I
> don't especially like subclassing, but there is a strong desire to migrate
> code from some existing programs to BitC, so being able to translate the
> idioms (or not needing to) is a consideration.
>
>
> 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