Rvalue references - The resolution

Jonathan M Davis jmdavisProg at gmx.com
Sat May 4 19:36:31 PDT 2013


On Saturday, May 04, 2013 19:07:25 Walter Bright wrote:
> On 5/4/2013 5:42 PM, bearophile wrote:
> > Andrei Alexandrescu:
> >> http://static.rust-lang.org/doc/tutorial-borrowed-ptr.html
> > 
> > The management of pointers is one of the most refined parts of the Rust
> > design. It offers safety, allows per-thread GCs, and more. It's powerful
> > but it also adds some complexity to the language.
> 
> Years ago, Bartosz proposed an ownership system for pointers. While sound,
> it was rather complicated.
> 
> I don't think a complex system is going to gain wide adoption.

The trick is balancing it so that it's powerful enough and yet not too 
complicated to be useable by normal programmers. I think that we're okay, but 
I also think that we're pushing it as it is. Going with Bartosz proposal would 
almost certainly have been too much.

As it is, we arguably didn't choose the best defaults with the attributes that 
we have (e.g. @system is the default instead of @safe, and impure is the 
default instead of pure). The result is that we have to use a lot of 
annotations if we want to properly take advantage of the various language 
features, whereas ideally, having to use annotations for stuff like @safety or 
purity would be the exception. Don was complaining that one reason that moving 
to D2 at Sociomantic looks unappealing in spite of the benefits is the fact 
that they're going to have to add so many extra annotations to their code.

- Jonathan M Davis


More information about the Digitalmars-d mailing list