September 05, 2006 General » Suggestion: shortcut for 'new X' #2 | |||
|---|---|---|---|
| |||
...keyword here): Foo f1 = local Foo; //stack/RAII Foo f2 = new Foo; //heap I like... | |||
September 05, 2006 General » Re: Walter: Before you go and implement the new RAII syntax.. | |||
|---|---|---|---|
| |||
On Tue, 05 Sep 2006 19:30:30 +0300, Robert Atkinson <Robert.Atkinson@NO.gmail... | |||
September 05, 2006 General » Re: Walter: Before you go and implement the new RAII syntax.. | |||
|---|---|---|---|
| |||
...file = new File(); // local RAII local auto file = new File(); // local RAII + auto typing or... | |||
September 05, 2006 General » Re: Walter: Before you go and implement the new RAII syntax.. | |||
|---|---|---|---|
| |||
I despise writing "me too" posts, but in this case I just cannot avoid it... | |||
September 05, 2006 General » Re: Walter: Before you go and implement the new RAII syntax.. | |||
|---|---|---|---|
| |||
The following works right now, and does so just fine:
Foo foo = SomeFactory.newFoo(...); scope... | |||
September 05, 2006 General » Re: Walter: Before you go and implement the new RAII syntax.. | |||
|---|---|---|---|
| |||
If there's to be a symbol to signify "stack allocation" then it should be... | |||
September 05, 2006 General » Re: Walter: Before you go and implement the new RAII syntax.. | |||
|---|---|---|---|
| |||
Specifying storage mechanism seems like unnecessary compiler hamstringing. Specify behavior and give the compiler authors... | |||
September 05, 2006 General » Re: Walter: Before you go and implement the new RAII syntax.. | |||
|---|---|---|---|
| |||
...allocate on stack Foo d = scope Foo(); // raii Also, it may be wise to make... | |||
September 05, 2006 General » Re: Walter: Before you go and implement the new RAII syntax.. | |||
|---|---|---|---|
| |||
On Tue, 5 Sep 2006 00:55:56 -0400, Jarrett Billingsley wrote: I strongly agree... | |||
September 05, 2006 General » Walter: Before you go and implement the new RAII syntax.. | |||
|---|---|---|---|
| |||
...I'm talking about: Foo f = Foo(); // RAII Foo g = new Foo(); // Normal Can we... | |||
Copyright © 1999-2021 by the D Language Foundation