And @ even makes sense for what it's doing (placing something at somewhere) when compared with most operators.
On Mon, Dec 2, 2013 at 12:04 PM, Kevin Ballard <[email protected]> wrote: > ~ would still be the unique default. @ would require a place (because > there's no placement without a place). Just because C++ uses the same > operator for regular allocation and for placement doesn't mean we have to > do the same. As it's been pointed out already, C++'s use of `new` for > placement is kind of quite strange, since it doesn't actually allocate > anything. > > As for "too punctuation heavy", why the hate on punctuation? Operators > have a long history of use in programming languages to great effect. I > don't get why operators are now suddenly bad. User-overloadable operators > are contentious, certainly, but this isn't an overloadable operator. > > -Kevin > > On Dec 2, 2013, at 11:38 AM, Patrick Walton <[email protected]> wrote: > > Besides, unless you remove the unique default (which I think would be too > verbose) the default allocator reduces to a pointer sigil. > > Patrick Walton <[email protected]> wrote: >> >> Still too punctuation heavy. >> >> Kevin Ballard <[email protected]> wrote: >>> >>> What do you mean? This suggestion uses @ as an operator, not as a sigil. >>> >>> -Kevin >>> >>> On Dec 2, 2013, at 10:23 AM, Patrick Walton <[email protected]> wrote: >>> >>> Anything with @ feels like it goes too close to pointer sigils for my >>> taste. >>> >>> Patrick >>> >>> spir <[email protected]> wrote: >>>> >>>> On 12/02/2013 11:57 AM, Kevin Ballard wrote: >>>> >>>>> With @ going away another possibility is to leave ~ as the normal >>>>> allocation operator and to use @ as the placement operator. So ~expr >>>>> stays the same and placement looks either like `@place expr` or >>>>> `expr@place` >>>> >>>> >>>> I like that, with expr@place. Does this give: >>>> let foo = ~ bar; >>>> let placed_foo = bar @ place; >>>> ? >>>> >>>> Yet another solution, just for fun, using the fact that pointers are >>>> supposed to >>>> "point to": >>>> >>>> let foo = -> bar; >>>> let placed_foo = bar -> place; >>>> >>>> Denis >>>> ------------------------------ >>>> >>>> Rust-dev mailing list >>>> [email protected] >>>> https://mail.mozilla.org/listinfo/rust-dev >>>> >>>> >>> -- >>> Sent from my Android phone with K-9 Mail. Please excuse my brevity. >>> _______________________________________________ >>> Rust-dev mailing list >>> [email protected] >>> https://mail.mozilla.org/listinfo/rust-dev >>> >>> >>> >> > -- > Sent from my Android phone with K-9 Mail. Please excuse my brevity. > > > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev > >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
