November 12, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
Walter Bright wrote: Well, 'var' is used in C# 3.0 for this purpose (which... | |||
November 12, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
I know it's a little different, but it's so convenient. Also, the no... | |||
November 12, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
No, it's way way more than that. Auto type deduction gets us much closer... | |||
November 12, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
My problem with "var" is the history of the keyword. Back in the olden days... | |||
November 12, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
...object, no RAII 2) scoped a = new A(); // type inference, new object, RAII 3) auto... | |||
November 12, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
It's an interesting proposal. What I was thinking of eventually for 'auto' is to... | |||
November 12, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
True. Consider that type inference works in these cases: static a = 3; // a is an... | |||
November 12, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
Didn't you mean "bright person" ? :P I completely agree. The current "auto" can then... | |||
November 12, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
What I would prefer is if you introduced a new keyword that meant "declare". Just... | |||
November 12, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
Agreed. It does. But I'm not sure I prefer the only viable alternative in... | |||
Copyright © 1999-2021 by the D Language Foundation