Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #15335
| From | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Terminology - RAII vs. Scope Guard vs...? |
| Date | 2012-04-13 02:34 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <jm7sbb$11l$1@dont-email.me> (permalink) |
| References | (2 earlier) <9164b5b9-0424-4acf-9d2f-1344db90b3a7@w5g2000vbv.googlegroups.com> <d94ae8b7-7785-4464-8c6d-0d7b0a3c7494@h20g2000yqd.googlegroups.com> <d2c8f1f1-c35b-47de-95c9-72c4ff47616a@2g2000yqp.googlegroups.com> <3217aa7e-650f-419f-b783-b23d608e25c8@gh10g2000pbc.googlegroups.com> <0309d0e0-c530-4dbd-986a-de28f3000a47@f37g2000yqc.googlegroups.com> |
On 13.04.2012 01:48, Noah Roberts wrote:
> On Apr 12, 2:31 pm, Joshua Maurice<joshuamaur...@gmail.com> wrote:
>
>> Ok. Sorry. This is now an unintentional argument over definitions
>> ("philosophy" and "idiom" and "policy"). The argument is not terribly
>> interesting. I am glad we are otherwise in agreement.
>
> Except that you claimed that scope guards are a kind of RAII that that
> does not appear to be the case. They are *similar*, in that they both
> use the destructor to cause something to happen when scope is exited,
> but not the same. RAII for one clearly means that we're acquiring a
> resource as we initialize an object...that is the fundamental part of
> scope based creation/destruction events that makes something RAII.
> Scope guards don't necessarily do that nor are they necessarily about
> any resource at all...they might just print a message if you don't
> tell them not to.
>
> Thus my question remains and you've done little but serve to distract
> the conversation. When talking about these different things, and it's
> important that they have different terms because they are in fact
> different, what do you call something that's sort of like a scope
> guard but does not have a backout...in other words you never release
> it.
>
> Before you go saying it's the same thing...it's not:
> http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Scope_Guard
The Wikipedia article is written by someone who doesn't understand a
thing, and who treats obvious things as significant.
It's very annoying with such wanna-be academics.
You better read up on the original DDJ article by Alexandrescu & Marginan.
Cheers & hth.,
- Alf
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Terminology - RAII vs. Scope Guard vs...? Noah Roberts <roberts.noah@gmail.com> - 2012-04-10 13:47 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Joshua Maurice <joshuamaurice@gmail.com> - 2012-04-10 14:36 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Noah Roberts <roberts.noah@gmail.com> - 2012-04-11 09:10 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Joshua Maurice <joshuamaurice@gmail.com> - 2012-04-11 12:28 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Noah Roberts <roberts.noah@gmail.com> - 2012-04-11 13:29 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Rui Maciel <rui.maciel@gmail.com> - 2012-04-12 02:29 +0100
Re: Terminology - RAII vs. Scope Guard vs...? Joshua Maurice <joshuamaurice@gmail.com> - 2012-04-12 14:31 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Noah Roberts <roberts.noah@gmail.com> - 2012-04-12 16:48 -0700
Re: Terminology - RAII vs. Scope Guard vs...? "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-04-13 02:34 +0200
Re: Terminology - RAII vs. Scope Guard vs...? Miles Bader <miles@gnu.org> - 2012-04-13 10:57 +0900
Re: Terminology - RAII vs. Scope Guard vs...? "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-04-13 09:52 +0200
Re: Terminology - RAII vs. Scope Guard vs...? Rui Maciel <rui.maciel@gmail.com> - 2012-04-13 10:48 +0100
Re: Terminology - RAII vs. Scope Guard vs...? Miles Bader <miles@gnu.org> - 2012-04-13 22:18 +0900
Re: Terminology - RAII vs. Scope Guard vs...? Noah Roberts <roberts.noah@gmail.com> - 2012-04-13 09:21 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-04-11 21:36 +0000
Re: Terminology - RAII vs. Scope Guard vs...? Noah Roberts <roberts.noah@gmail.com> - 2012-04-11 16:07 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Juha Nieminen <nospam@thanks.invalid> - 2012-04-12 06:10 +0000
Re: Terminology - RAII vs. Scope Guard vs...? Gareth Owen <gwowen@gmail.com> - 2012-04-12 18:18 +0100
Re: Terminology - RAII vs. Scope Guard vs...? Juha Nieminen <nospam@thanks.invalid> - 2012-04-13 04:52 +0000
Re: Terminology - RAII vs. Scope Guard vs...? Gareth Owen <gwowen@gmail.com> - 2012-04-13 06:59 +0100
Never using free() or realloc(). Destroying heaps. @Jeff-Relf.Me - 2012-04-13 00:55 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Rui Maciel <rui.maciel@gmail.com> - 2012-04-11 21:28 +0100
Re: Terminology - RAII vs. Scope Guard vs...? Noah Roberts <roberts.noah@gmail.com> - 2012-04-11 13:40 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Rui Maciel <rui.maciel@gmail.com> - 2012-04-12 02:27 +0100
Re: Terminology - RAII vs. Scope Guard vs...? scott@slp53.sl.home (Scott Lurndal) - 2012-04-12 17:25 +0000
Re: Terminology - RAII vs. Scope Guard vs...? Gareth Owen <gwowen@gmail.com> - 2012-04-12 19:21 +0100
Re: Terminology - RAII vs. Scope Guard vs...? Noah Roberts <roberts.noah@gmail.com> - 2012-04-12 16:38 -0700
Re: Terminology - RAII vs. Scope Guard vs...? Rui Maciel <rui.maciel@gmail.com> - 2012-04-13 11:02 +0100
Re: Terminology - RAII vs. Scope Guard vs...? nick_keighley_nospam@hotmail.com - 2012-04-13 00:29 -0700
Re: Terminology - RAII vs. Scope Guard vs...? nick_keighley_nospam@hotmail.com - 2012-04-13 00:14 -0700
csiph-web