We have previously agreed that the structure type must be declared in
this case if it cannot be unambiguously inferred. Check your research
notebook.

There is a *big* usability difference between this and the O'Caml
restruction. The "no reuse" restriction is a fundamental violation of
universally accepted principles of sound namespace design. If we were to
accept the "no reuse" restriction, we would become link-incompatible
with all other languages.

shap

On Wed, 2005-06-08 at 19:25 -0400, Swaroop Sridhar wrote:
> Unlike CAML records, BitC allows re-use of record labels across 
> structure definitions. Consider the following situation:
> 
> (defstruct (a 'a) A:'a)
> (defstruct (b 'a) A:'a)
> 
> (define (f x) x.A)
> 
> This is actually a special case of type-case, but one that matters.
> In order to correctly type f, we need a mechanism like match-functions[1].
> 
> Otherwise, we will have to declare an error and require disambiguation 
> (or worse choose one arbitrarily). In that case, the restriction is (in 
> theory) no less restrictive than CAML's no-reuse restriction.
> 
> [1] http://www.cs.jhu.edu/~pari/papers/fool2004/first-class_FOOL2004.pdf
> 
> Swaroop.
> _______________________________________________
> 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