Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overloaded-box and placement-in #809

Merged
merged 11 commits into from
Feb 11, 2015
Merged
Prev Previous commit
Next Next commit
mention more about alternative syntax.
  • Loading branch information
pnkfelix committed Feb 5, 2015
commit a980f3d2b4fe110a34dde39b0fad9b9ee603d121
20 changes: 20 additions & 0 deletions text/0000-box-and-in-for-stdlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,26 @@ tandem with types provided by the stdlib, such as `Box<T>`.
some integration with `box` pattern syntax that would motivate using
the `box` keyword for placement.

* A number of other syntaxes for placement have been proposed in the
past; see for example discussion on [RFC PR 405] as well as
[the previous placement RFC][RFC Surface Syntax Discussion].

The main constraints I want to meet are:
1. Do not introduce ambiguity into the grammar for Rust
2. Maintain left-to-right evaluation order (so the place should
appear to the left of the value expression in the text).

But otherwise I am not particularly attached to any single
syntax.

One particular alternative that might placate those who object
to placement-`in`'s `box`-free form would be:
`box (in <place-expr>) <expr>`.

[RFC PR 405]: /~https://github.com/rust-lang/rfcs/issues/405

[RFC Surface Syntax Discussion]: /~https://github.com/pnkfelix/rfcs/blob/fsk-placement-box-rfc/text/0000-placement-box.md#same-semantics-but-different-surface-syntax

* Do nothing. I.e. do not even accept an unstable libstd-only protocol
for placement-`in` and overloaded-`box`. This would be okay, but
unfortunate, since in the past some users have identified
Expand Down