On Tue, Aug 27, 2013 at 3:04 PM, David Jeske <[email protected]> wrote:

> On Tue, Aug 27, 2013 at 10:15 AM, Jonathan S. Shapiro <[email protected]>wrote:
>
>> Yup. But that's more a CLR issue than a C# issue. The language can't
>>> currently mandate tail calls because the CLR doesn't support it. It's a
>>> chicken and egg sort of thing.
>>>
>>
> Isn't this equally true for many of these items?
>

Oh yes. C# is in many respects a direct reflection of CLR.


> Fixed-sized arrays as safe types presumably requires fixed-sized-arrays as
> generic type-paramaters, which requires CLR support parametric
> instantiation of type-and-length.
>

Sure. But that's something that CLR already knows how to do, because
unboxed types (in CLR-speak: value types) can be used as type parameters in
generics. A fixed-size array type is just another unboxed type.


> Can a "proper region typing system" (or Rush-ish named lifetimes) be done
> without CLR changes? Or at least changes to CLR verification?
>

To do it in a way that would be "first class" in CLR, the CLR type checker
would require significant changes. I'm not sure what changes beyond type
checking would be required in the verifier.

But that doesn't preclude building BitC on CLR. It's perfectly possible to
build a compiler and linker for BitC that encode extra properties in the
assemblies, and use our own linker. In that approach, we're simply viewing
CLR as providing a target assembly language. We may need to emit extra code
in order for CLR to agree that our program is safe (because our analysis
considers things that CLR does not), but we can still emit code to CLR.

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

Reply via email to