>  Simon says:
>  Warren makes an excellent point, though he doesn't highlight it:
>  
>       unlifted tuples are INCOMPATIBLE with seq
>  
>  The reason for this is that we can't implement unlifted tuples directly at
>  all.  Instead, we simulate them by making pattern matching lazy, so that
>  _|_ behaves identically to (_|_,_|_), even though the two may have different
>  runtime representations.  The seq function exposes the trick!

In a private conversation with Arvind some days ago I pointed out
that, contrary to his earlier message, there is a situation where Id,
too, distinguishes lifted from unlifted tuples. It turns out to
correspond exactly to the situation that Warren and Simon cite.  In Id
we have a sequencing construct (called a ``barrier'') which behaves in
the same way:

    { x = (e1,e2);
      ( y = x
        ---          % this sequences the statements in parens
        z = y )
    In
      z }

This will return a tuple even if e1 and e2 diverge, whereas:

    { ( y = (e1,e2)
        ---          % this sequences the statements in parens
        z = y )
    In
      z }

this will return a tuple only if e1 and e2 terminate.

Nikhil

Reply via email to