On 12/01/2013 06:42 AM, Patrick Walton wrote:
On 11/30/13 6:49 PM, Corey Richardson wrote:
I'll admit, I don't find the "confusing" argument very convincing. I
just think `box` looks better than `~`.
I'm warming up to this idea -- `box 10` does make more sense than `new
10`.
Patrick
Thinking about it, `box` indeed seems like a good compromise to me:
- It is as short as `new`, and more verbose than `~`, which is good.
- It is a infrequently used word in source code.
- It is syntactically used like `new` of other languages, which makes it
better recognizable as such.
- But it has a completely different semantic than, say, `C++`s `new`,
justifying the different name.
- The box metaphor might also make documentation about custom smart
pointers, and the deref operator easier.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev