November 11, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
I agree. Even if "everybody else is doing it", I think auto is a poor... | |||
November 11, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
I've already said it before, but it bears repeating yet again. I also prefer... | |||
November 11, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
Chris Miller wrote: Considering that scope already exists as a keyword, I find this an... | |||
November 11, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
On Sat, 11 Nov 2006 13:48:00 -0500, Walter Bright <newshound@digitalmars.com> wrote... | |||
November 11, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
...already, I'll only say: auto for RAII, and something else (eg: var) for type... | |||
November 11, 2006 General » auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
...and (3), then it does not mean RAII. If it is not used for type... | |||
October 27, 2006 Learn » Re: 'raii' for structs | |||
|---|---|---|---|
| |||
Drop the variables all together.. no need for them here:
void somefunc()
{
int oldmode = setRoundingMode... | |||
October 27, 2006 Learn » Re: 'raii' for structs | |||
|---|---|---|---|
| |||
T With_ROUNDTOZERO(T)( lazy T dg )
{
RoundingMode oldmode = setRoundingMode(ROUNDTOZERO);
T ret = dg();
setRoundingMode... | |||
October 27, 2006 Learn » Re: 'raii' for structs | |||
|---|---|---|---|
| |||
...ll admit I sometimes miss stack-based raii types as well. An alternative would be... | |||
October 27, 2006 Learn » Re: 'raii' for structs | |||
|---|---|---|---|
| |||
Using inner functions its just as clean IMO. void withRounding( int mode, void delegate() dg... | |||
Copyright © 1999-2021 by the D Language Foundation