I don't think it introduces any ambiguity. The optional "in" is similar to
the optional "else" in "if".
I'm pretty sure this grammar would suffice:

alloc_expr : "~" expr in_tail ? ;
in_tail : "in" expr ;

The expr of in_tail would need to be considered a 'place' (some sort of
trait I assume) by the typechecker.
Ending in_tail with an expr shouldn't be a problem (lambda_expr does it).
The parser can unambiguously tell if there is an in_tail present by simply
checking for the "in" keyword.


On Mon, Dec 2, 2013 at 12:56 AM, Ziad Hatahet <[email protected]> wrote:

> On Mon, Dec 2, 2013 at 12:43 AM, Eric Reed <[email protected]>wrote:
>
>> In either case, I think keeping ~ as sugar for allocating on the exchange
>> heap would be nice (i.e. "~expr" is sugar for "~expr in Unique" or "put
>> expr in Unique").
>>
>
> `box expr in place` reads nicely too. I don't know about any ambiguity in
> the syntax though.
>
> --
> Ziad
>
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to