Am Fri, 17 Jan 2014 00:17:58 +0000
schrieb "Adam D. Ruppe" <destructiona...@gmail.com>:

> On Friday, 17 January 2014 at 00:03:21 UTC, Meta wrote:
> > Didn't Andrei mention something about wanting new to be removed 
> > from the language and replaced with a library solution using 
> > allocators?
> 
> I'm not sure if he's on board, but that's something I've been 
> wanting for a while. Probably won't happen though, the new 
> operator has a lot of fans (I kinda like it myself and fear the 
> massive amount of code breakage removing it would cause).
> 
> But we could still use specialized alternatives - new being there 
> doesn't prohibit using a create function.

The state of NotNull without it being a language feature would
still be a bit silly. A good implementation allows promotion
to NotNull like this:

void foo(Object o) {
    if (o !is null) {
        bar(o);
    }
}

void bar(NotNull!Object) {}

Maybe it could be implemented like "if (__ctfe)".

-- 
Marco

Reply via email to