Revamped concurrency API

Bartosz Milewski bartosz-nospam at relisoft.com
Thu Oct 15 13:10:24 PDT 2009


bearophile Wrote:

> Jeremie Pelletier:
> 
> > I vote for a 'lent' qualifier to be implemented in the compiler.
> 
> You may be right, and Bartosz has explained me why and how to use lent. It sounds like a nice idea, but it has some costs too (in language complexity, for example). But I need to use such things in practice, in real (even small) programs to know/understand if I like and understand them enough.
> 
> So I'd like to have an experimental version of D where such ideas (like lend, nonnull references, and few other things) can be tried, and if they are experimentally seen as not good (by me too), they can be discarded and removed. For me this is true for nonnull references, but such experimental need is even strong for lend.
> 
> It seem all the long discussion regarding nonnull references has gone nowhere. That has made me a little sad. Only a bit of flow analysis has being accepted, to cover certain cases of a specific bug case of uninitialized objects.
> 

This is where Java shines. Their annotation system is flexible enough to allow this kind of experimenting. In particular they were able to implement const and nonNull using annotations. See the talk by Mike Ernst from the University of Washington: http://www.vimeo.com/4368251 .



More information about the Digitalmars-d mailing list