Change official RAII to CADRe

Showing 1-40 of 40 messages
Change official RAII to CADRe Arthur Tchaikovsky 11/6/12 5:51 AM
As Mr. Bjarne on many occasions admitted himself that he is not the best
in creating "catchy" be it phrases or words etc, when I came across
(long time ago) the RAII acronym I needed to spend a while to grasp
what it really tried to explain/condense even though I've had it
"unfolded", to "resource acquisition ..."
I think we could agree that the RAII acronym isn't the best choice for
the technique it describes/tries to describe.
If so how would you feel about trying to rename/reintroduce RAII as a
CADRe which simply unfolds to: Constructor Acquires Destructor
Releases, and on top of that is actually within the definition of this
word (with slight changes to some of the wording):

http://www.merriam-webster.com/dictionary/cadre

"a nucleus or core group ...; broadly : a group of [functions] having
some unifying relationship <a cadre of lawyers>"

1. In the fragment above word [functions] was put in place of: people

I believe that this is easier to remember and it's much more
meaningful and easier to understand by new users/programmers of C++.

Thank you

Best Regards
Re: [std-proposals] Change official RAII to CADRe Nevin ":-)" Liber 11/6/12 7:22 AM
On 6 November 2012 07:51, Arthur Tchaikovsky <atch...@gmail.com> wrote:
I think we could agree that the RAII acronym isn't the best choice for
the technique it describes/tries to describe.

I have no idea what this has to do with the standard, as neither RAII nor "Resource Acquisition Is Initialization" appears in it.
--
 Nevin ":-)" Liber  <mailto:ne...@eviloverlord.com>  (847) 691-1404
Re: [std-proposals] Change official RAII to CADRe Tony V E 11/10/12 10:59 PM
P. S.  It is really "Responsibility Acquisition Is Initialization".
:-)

(see Jon Kalb's boostcon talk)


From: "Nevin Liber" <ne...@eviloverlord.com>
To: "std-pr...@isocpp.org" <std-pr...@isocpp.org>
Sent: 6 November, 2012 10:22 AM
Subject: Re: [std-proposals] Change official RAII to CADRe
--
 
 
 
Re: Change official RAII to CADRe Václav Haisman 11/15/12 11:09 AM
Dne úterý, 6. listopadu 2012 14:51:10 UTC+1 Arthur Tchaikovsky napsal(a):
[...]

If so how would you feel about trying to rename/reintroduce RAII as a
CADRe which simply unfolds to: Constructor Acquires Destructor
Releases, and on top of that is actually within the definition of this
word (with slight changes to some of the wording):
Many people in the ##C++@FreeNode channel have been suggesting using SBRM instead of RAII. SBRM stands for Scope Bound Resource Management.

--
VZ

Re: [std-proposals] Re: Change official RAII to CADRe josedaniel.garcia 11/15/12 6:03 PM
As Nevin pointed out RAII is not a term defined by the standard.

And by the way. 

This is a joke. Isn't it? Now that I got used to the acronym, do you really want to change it?


--
 
 
 



--
Prof. J. Daniel Garcia
Associate Professor - Profesor Titular de Universidad
Computer Architecture Group
University Carlos III of Madrid
Avda. Universidad Carlos III, 22
28270 Colmenarejo, Madrid. Spain
Tel: +34 918561316
Fax: +34 91 856 1270
e-mail: josedani...@uc3m.es
Web: http://www.arcos.inf.uc3m.es/~jdaniel
 
Linked-In: http://es.linkedin.com/in/jdanielgarcia
Twitter: http://www.twitter.com/jdgarciauc3m
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/15/12 10:56 PM
Jose

Please note that there are people who are just about to start learning C++ and it's for their benefits we should make the language easier. Those who know C++ already don't need to even think before using this technique. They know it and they use it. I get it. It is for people who don't know C++ and then you try to explain them RAII. It took me a while before I understood the meaning of "unfolded" so to speak mnemonic. Resource aquisition is initialization? What does it mean?!! Is this english? 
So no, it's not a joke. Why?
a) actually means something "a nucleus or core group ...; broadly : a group of [functions] having some unifying relationship"
b) actually does what it says  - cooperates, meaning that Constructor Acquires, Destructor Releases
c) it is actual word

I think that instead of concentrating on what we know already, we should concentrate of future and future of C++ - make it as easy to learn and use as possible. RAII is a silly, meaningless acronym, CADRe is not.

Now that I got used to the acronym, do you really want to change it?

Similarly to changing habits of not using raw pointers and using "smart" pointers instead.
Re: [std-proposals] Re: Change official RAII to CADRe Nicol Bolas 11/16/12 9:17 AM


On Thursday, November 15, 2012 10:56:46 PM UTC-8, Arthur Tchaikovsky wrote:
Jose

Please note that there are people who are just about to start learning C++ and it's for their benefits we should make the language easier. Those who know C++ already don't need to even think before using this technique. They know it and they use it. I get it. It is for people who don't know C++ and then you try to explain them RAII. It took me a while before I understood the meaning of "unfolded" so to speak mnemonic. Resource aquisition is initialization? What does it mean?!! Is this english? 

How is that not English? All of those are well-defined English words, fitting into a proper English sentence according to English rules of grammar (subject-verb-object).
 
So no, it's not a joke. Why?
a) actually means something "a nucleus or core group ...; broadly : a group of [functions] having some unifying relationship"

Not according to Dictionary.com. Or Wiktionary. The primary definition of cadre is about military matters.
 
b) actually does what it says  - cooperates, meaning that Constructor Acquires, Destructor Releases

Acquires and releases what? At least RAII talks about resources.
 
c) it is actual word

I think that instead of concentrating on what we know already, we should concentrate of future and future of C++ - make it as easy to learn and use as possible. RAII is a silly, meaningless acronym, CADRe is not.

The thing you keep missing in this discussion is where you are. This is a discussion group for the Standard for Programming Language C++. This standard does not teach RAII. It does not tell the reader how to use RAII. It never mentions RAII.

You're suggesting that a document (the standard) be modified to change terminology it never uses.

If you want to bikeshed CARDe vs. RAII vs. something else, fine. Just don't do it here; we discuss extensions to the standard here. And the standard does not talk about any of this. This is not the place for this discussion.
 
Re: [std-proposals] Re: Change official RAII to CADRe josedaniel.garcia 11/16/12 9:21 AM
+1
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/17/12 4:05 AM
How is that not English? 
RAII? what word is that? is this english? CADRE is. 
Re: [std-proposals] Re: Change official RAII to CADRe Nicol Bolas 11/17/12 8:33 AM


On Saturday, November 17, 2012 4:05:04 AM UTC-8, Arthur Tchaikovsky wrote:
How is that not English? 
RAII? what word is that? is this english? CADRE is. 

Your "is that English" remark was clearly directed at "Resource acquisition is initialization." Let's not pretend like you were talking about the acronym here.

In any case, there are plenty of acronyms that aren't English words. RSA, JSON, XML, HTML, etc. That hasn't stopped people from using them.

I have heard alternative names for RAII, but I'd never heard of "CADRe" before. There are C++ books that already exist, promoting the use of RAII and have done so for near on a decade now.

Why should they be rewritten just to call it something else? This is the ultimate bikeshed issue: it will have a negligible effect on anything, it will only create vast confusion between people who use the established name and people who don't.

RAII won; it got there first and it's in wide-spread use. Let it go already. You don't rename a term in wide usage just because you feel it might be a bit better at describing what that functionality does.

Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/18/12 2:54 AM
Your "is that English" remark was clearly directed at "Resource acquisition is initialization." Let's not pretend like you were talking about the acronym here.

At this stage it is purely academic, and so it follows, more or less pointless and useless but would you mind not telling me what I had in mind? Because when I was speaking about RAII as a non-English word while CADRE is English.

I have heard alternative names for RAII, but I'd never heard of "CADRe" before

And your point is?

  There are C++ books that already exist, promoting the use of RAII and have done so for near on a decade now.

Again, your point is?

RAII, omg, even when new people read it they have to really think about it. It is so unnatural and meaningless. And what that it has been in use for decade or more? Just like raw pointers are and now we have preferences for smart pointers - does it cause confusion? Apparently only amongst people for whom recursion is no harder than iteration.

CADRe reflects the whole technique much better than RAII, it simply does what it says on the tin.

And just because you've never heard of something it doesn't mean that it is a bad idea. What kind of logic is this?

Discussion with you Nicol is pointless. Why? Because you contradict yourself from post to post. Example:

You stated in one of your post that recursion is no harder to iteration so there is no need for having a mechanism which would allow iteration over variadic templates. Yet, few post later, in another thread you are all heated up for static for? Why? Why would you like to have static for when you already can do what static for will do. You have recursion which according to you is no harder to iteration, so why would you waste time of everybody to have such a feature? Where is the consistency?
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/18/12 5:05 AM
I have heard alternative names for RAII, but I'd never heard of "CADRe" before
Two things:
a) and your point is?
b) you've never heard of it because it is my idea and it is me who posted it here for the first time in public.
Re: [std-proposals] Re: Change official RAII to CADRe Nicol Bolas 11/18/12 9:12 AM
On Sunday, November 18, 2012 2:54:58 AM UTC-8, Arthur Tchaikovsky wrote:
Your "is that English" remark was clearly directed at "Resource acquisition is initialization." Let's not pretend like you were talking about the acronym here.

At this stage it is purely academic, and so it follows, more or less pointless and useless but would you mind not telling me what I had in mind? Because when I was speaking about RAII as a non-English word while CADRE is English.

Then you should have made that more clear in your paragraph structure. Here is a direct quote: "It took me a while before I understood the meaning of "unfolded" so to speak mnemonic. Resource aquisition is initialization? What does it mean?!! Is this english?"

The most recent thing that "this" could be referring to is "Resource aquisition[sic] is initialization". That's what "it" referred to, so the obvious inference is that "this" and "it" are talking about the same thing.

You made a mistake in your paragraph structure, leading to a misunderstanding.
 
I have heard alternative names for RAII, but I'd never heard of "CADRe" before

And your point is?

That you're not going to convince the rest of the world to adopt your language, just because you thought it up and think it's better. The decision on what to call this technique has been made; it was made years ago.

If you were Herb Sutter, Scott Meyers, and Bjarne Stroustrup all rolled into one, you might, might, be able to convince the rest of the world to adopt your terminology. But only by rewritting all of your books to excise the old term in favor of the new.

As it stands, you are a guy on a forum. The ship has sailed. The horse is out of the barn; trying to close the doors now isn't helping.

Oh, and again, this is not the place to discuss this. This is a place to discuss issues related to the Standard for Programming Language C++, which never mentions RAII at all. Please take it to some other forum where this would be on-topic.
 
Discussion with you Nicol is pointless. Why? Because you contradict yourself from post to post. Example:

You stated in one of your post that recursion is no harder to iteration so there is no need for having a mechanism which would allow iteration over variadic templates.

No, I did not.

I stated that it had not been demonstrated that recursion was harder than iteration. Because that was central to the argument, the argument that there was a need for iteration over variadic templates was flawed.

It like this:

All fish live in the ocean.
All sharks are fish.
Therefore, all sharks live in the ocean.

The conclusion may be correct, but one of the premisses is factually inaccurate. It is possible to agree with a conclusion without agreeing with the reasoning that a person used to arrive at that conclusion. You can want iteration, but not because it makes things easier.
 
Yet, few post later, in another thread you are all heated up for static for? Why? Why would you like to have static for when you already can do what static for will do. You have recursion which according to you is no harder to iteration, so why would you waste time of everybody to have such a feature? Where is the consistency?

Because static for is not about ease of use; it's about being able to do what you couldn't do before. static for, particularly when applied to member variables and functions, now allows a std::tuple to be a standard-layout type (and possibly trivial), if its member types are standard layout/trivial. It allows std::tuple to have named members in addition to the `get<>` interface. It hooks into constexpr, allowing static iteration over a static numerical range. It may have many other uses in static reflection scenarios that have yet to be defined.

And yes, it also makes it easier to iterate over template parameter packs. But that's only one part of a much larger feature. It's a... fortunate consequence, not the primary designed purpose of the feature.

The difference between the original idea and his is that there was no original idea at all. There was just "Let's allow iteration over parameter packs... somehow." By providing an actual idea that is at least conceptually implementable, it went from being a limited feature that existed only to ostensibly satisfy people who can't figure out recursion, to a real feature with innumerable uses that also just so happens to satisfy people who can't figure out recursion.

See the difference? An actual idea is much better than "let's do this... somehow."
Re: [std-proposals] Re: Change official RAII to CADRe Michał Dominiak 11/18/12 10:36 AM
His point (1) is that changing widely used term to some unknown to anyone (2) term is pointless.

That mail of yours pretty much proved that this proposal makes completely no sense. And standardizing the term for the technique is pretty idiotic.
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/18/12 11:03 PM
satisfy people who can't figure out recursion

It's about making life easier. I on few occasions explained that I do understand how recursion works, and I also use it. The point is that iteration is much more natural than recursion. But why would you listen?

See the difference? An actual idea is much better than "let's do this... somehow."
I've posted an initial idea for discussion, which you opposed from the very beginning, claiming that it would break type system, and that there is simply no way to do so. It looks like there is a way, but the will wasn't there. That changes the picture.
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/18/12 11:05 PM
Michał

Would you mind and watch your language? You're not at your mother's, so please at least pretend that you have some basic manners. Or am I to understand that we are to use any language we like from now on?
Re: [std-proposals] Re: Change official RAII to CADRe pibara 11/18/12 11:19 PM



2012/11/15 Václav Zeman <vhai...@gmail.com>
Scope bound != RAII

RAII has two essential properties:

1) It makes resource management scope bound.
2) It makes 'being a resource' non-transitive to composition.

There are alternatives to RAII with respect to scope bound resource management. Its what RAII does for the compositional transitivity of 'being a resource' however that IMHO makes RAII stand out high above other resource management facilities. 


Re: [std-proposals] Re: Change official RAII to CADRe pibara 11/18/12 11:40 PM



2012/11/16 Arthur Tchaikovsky <atch...@gmail.com>

Jose

Please note that there are people who are just about to start learning C++ and it's for their benefits we should make the language easier. Those who know C++ already don't need to even think before using this technique. They know it and they use it. I get it. It is for people who don't know C++ and then you try to explain them RAII. It took me a while before I understood the meaning of "unfolded" so to speak mnemonic. Resource aquisition is initialization? What does it mean?!! Is this english? 
So no, it's not a joke. Why?
a) actually means something "a nucleus or core group ...; broadly : a group of [functions] having some unifying relationship"
b) actually does what it says  - cooperates, meaning that Constructor Acquires, Destructor Releases
c) it is actual word

I think that instead of concentrating on what we know already, we should concentrate of future and future of C++ - make it as easy to learn and use as possible. RAII is a silly, meaningless acronym, CADRe is not.

The problem with people who are just about to start learning C++ and RAII doesn't lie in the name so much as it lies in the way we tend to still teach C++ as 'the better C', what I think is the wrong path. 

When learning C++ myself, I went to novices training that exposed me to beginner subjects, 'including' new and delete, but excluding RAII. I only stumbled upon RAII many years later after having gone trough many C style resource management issues in much of my C++ code, having cursed the day that C++ was conceived many a time in the process as a result. Well those were the old days, C++ teaching should have gotten better right? Well, seems it isn't. Looking at people coming back from C++ training's for novices still come back armed with new and delete but without having been taught about RAII. New prints of C++ books by venerable authors still have RAII in the advanced sections of their books, often 'after' templates. 

So, yes there is a major problem with the lack of use of RAII by novice C++ developers, but no, the name isn't the main problem. Rather than trying to fix the name (in a place where it apparently isn't even mentioned), the thing that would be needed would be that we should somehow try to teach the teachers that RAII should be less of an 'advanced' subject than new/delete. That is, teachers and C++ book writers should teach about resource management first, and about the heap second.


Re: [std-proposals] Re: Change official RAII to CADRe Jeffrey Yasskin 11/19/12 3:15 AM
I'll re-iterate Nevin's point: this thread is pointless. "RAII"
doesn't appear in the standard, it's not likely to ever appear in the
standard, and you haven't even bothered to propose that the standard
change. Please try to keep discussions on the list's topic,
"discussion about proposed extensions to the ISO C++ language and
standard library."
(https://groups.google.com/a/isocpp.org/forum/?fromgroups#!aboutgroup/std-proposals)
> --
>
>
>
Re: [std-proposals] Re: Change official RAII to CADRe pibara 11/19/12 4:00 AM



2012/11/19 Jeffrey Yasskin <jyas...@googlers.com>

I'll re-iterate Nevin's point: this thread is pointless. "RAII"
doesn't appear in the standard, it's not likely to ever appear in the
standard, and you haven't even bothered to propose that the standard
change. Please try to keep discussions on the list's topic,
"discussion about proposed extensions to the ISO C++ language and
standard library."
(https://groups.google.com/a/isocpp.org/forum/?fromgroups#!aboutgroup/std-proposals)


This raises an interesting question whether RAII as a concept should appear in the standard.
Given the existence of the "Pointer safety" section, it seems rather odd that garbage collecting 
as form of resource management is now mentioned in the standard, while the for C++ development 
arguably much more important RAII idiom is not.

From this, it would seem reasonable that, probably right after "stack unwinding" is defined, RAII
could have a similar definition to somewhat balance the fact that GC does appear in the standard.
Re: [std-proposals] Re: Change official RAII to CADRe Daniel Krügler 11/19/12 4:20 AM
2012/11/19 Rob Meijer <pib...@gmail.com>




2012/11/19 Jeffrey Yasskin <jyas...@googlers.com>
I'll re-iterate Nevin's point: this thread is pointless. "RAII"
doesn't appear in the standard, it's not likely to ever appear in the
standard, and you haven't even bothered to propose that the standard
change. Please try to keep discussions on the list's topic,
"discussion about proposed extensions to the ISO C++ language and
standard library."
(https://groups.google.com/a/isocpp.org/forum/?fromgroups#!aboutgroup/std-proposals)


This raises an interesting question whether RAII as a concept should appear in the standard.

Could you point out in which sense such a definition would fix a defect or would improve
semantic specification of the current wording? The standard does not define any concepts and does
not specify definitions, if those wouldn't be really used by the standard. At the moment I'm failing to
see what kind of problem would be resolved by adding such a definition.
 
Given the existence of the "Pointer safety" section, it seems rather odd that garbage collecting 
as form of resource management is now mentioned in the standard, while the for C++ development 
arguably much more important RAII idiom is not.

Well, the pointer-safety specification is needed to make it possible to integrate something like garbage collection
within a C++ implementation. Note that the Standard does not even name the term "garbage collection" in normative
wording. The "pointer safety" sub-clause just adds the minimum necessary to make such an integration possible,
because some user-contract is necessary for this.
 
From this, it would seem reasonable that, probably right after "stack unwinding" is defined, RAII
could have a similar definition to somewhat balance the fact that GC does appear in the standard.

There is no definition of GC in the standard (and is not needed). The term "stack unwinding" exists, because the standard refers to it in a normative way.

I don't see why there needs to be a definition of RAII.

- Daniel

Re: [std-proposals] Re: Change official RAII to CADRe josedaniel.garcia 11/19/12 7:08 AM
+1
Re: [std-proposals] Re: Change official RAII to CADRe ri...@longbowgames.com 11/19/12 8:36 PM
On Friday, November 16, 2012 1:56:46 AM UTC-5, Arthur Tchaikovsky wrote:
a) actually means something "a nucleus or core group ...; broadly : a group of [functions] having some unifying relationship"
 
A group of functions having some unifying relationship is the perfect description of a class. Besides which, Oxford's latest example of the word 'cadre' being used in the sense of 'framework' dates to 1868. Nowadays it's used to refer to a small group of highly trained people working in harmony, particularly if they're military and/or underhanded/revolutionary. Even if you ignore the negative implications of the word, it sounds more like it has something to do with parallel processing.

b) actually does what it says  - cooperates, meaning that Constructor Acquires, Destructor Releases

RAII does exactly what it says too: allocating resources is the same as initializing them. I remember when this term was new to me, and it clicked with me as soon as I read it. Maybe this is because I already had a lot of experience in treating resource allocation and resource initialization separately, but that's not exactly an uncommon approach.
 
c) it is actual word

Are you sure that's a good thing? Try searching Google for RAII. If there's a good chance that people don't know what your term means, it's awfully useful if that term is unique.
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/20/12 2:17 AM
RAII does exactly what it says too

No, RAII talks only about the init part, not about releasing resources. CADRe describes whole process in a nutshell. 
Re: [std-proposals] Re: Change official RAII to CADRe Michał Dominiak 11/20/12 9:24 AM
Then use it on your own, if you feel you need to. Good luck googling for it, good luck convincing others to use it, good luck to have to explain what that whole CADRe is [ Example:
<you> ...you know, CADRe...
<some other guy> what is that whole CADRe?
<you> you know, it's my own name for RAII, also called SBRM by some people
<some other guy> oh, why don't you just call it RAII?
-- end of example ], but it still has nothing to do with standard proposals or with standard alone. Go talk about it in various C++ communities, but not on ones related to standardization.
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/20/12 10:56 PM
It's not about me or anyone already familiar with C++. It's about making the whole language easier to learn for people who are just about to start. SBRM? How is that easier to remember to the CADRe - actual word, which when unfolded describes the technique from beginning to the end and one doesn't have to think twice in order to understand it? Resource Acquisition Is Initialization? What? What does it mean? On the other hand, Constructor Acquires Destructor Releases makes sense, is easy to remember and as I've already said, describes the whole technique from A to Z. RAII? It's horrible.

On Tuesday, 20 November 2012 17:24:14 UTC, Michał Dominiak wrote:
Then use it on your own, if you feel you need to. Good luck googling for it, good luck convincing others to use it, good luck to have to explain what that whole CADRe is [ Example:
<you> ...you know, CADRe...
<some other guy> what is that whole CADRe?
<you> you know, it's my own name for RAII, also called SBRM by some people
<some other guy> oh, why don't you just call it RAII?
-- end of example ], but it still has nothing to do with standard proposals or with standard alone. Go talk about it in various C++ communities, but not on ones related to standardization.

On Tuesday, 20 November 2012 11:17:17 UTC+1, Arthur Tchaikovsky wrote:
RAII does exactly what it says too

No, RAII talks only about the init part, not about releasing resources. CADRe describes whole process in a nutshell. 

On Tuesday, 20 November 2012 04:36:57 UTC, ri...@longbowgames.com wrote:
On Friday, November 16, 2012 1:56:46 AM UTC-5, Arthur Tchaikovsky wrote:
a) actually means something "a nucleus or core group ...; broadly : a group of [functions] having some unifying relationship"
 
A group of functions having some unifying relationship is the perfect description of a class. Besides which, Oxford's latest example of the word 'cadre' being used in the sense of 'framework' dates to 1868. Nowadays it's used to refer to a small group of highly trained people working in harmony, particularly if they're military and/or underhanded/revolutionary. Even if you ignore the negative implications of the word, it sounds more like it has something to do with parallel processing.

b) actually does what it says  - cooperates, meaning that Constructor Acquires, Destructor Releases

RAII does exactly what it says too: allocating resources is the same as initializing them. I remember when this term was new to me, and it clicked with me as soon as I read it. Maybe this is because I already had a lot of experience in treating resource allocation and resource initialization separately, but that's not exactly an uncommon approach.
 
c) it is actual word

Are you sure that's a good thing? Try searching Google for RAII. If there's a good chance that people don't know what your term means, it's awfully useful if that term is unique.
Re: [std-proposals] Re: Change official RAII to CADRe Ville Voutilainen 11/20/12 11:47 PM
On 21 November 2012 08:56, Arthur Tchaikovsky <atch...@gmail.com> wrote:
> It's not about me or anyone already familiar with C++. It's about making the
> whole language easier to learn for people who are just about to start. SBRM?
> How is that easier to remember to the CADRe - actual word, which when
> unfolded describes the technique from beginning to the end and one doesn't
> have to think twice in order to understand it? Resource Acquisition Is
> Initialization? What? What does it mean? On the other hand, Constructor
> Acquires Destructor Releases makes sense, is easy to remember and as I've
> already said, describes the whole technique from A to Z. RAII? It's
> horrible.

Then by all means talk to the book authors and teachers who use the term RAII,
and see whether they are willing to adopt a different term. This forum
is, as has been
pointed out multiple times, not the right place to discuss it. The
standard doesn't
use the term RAII, and the committee has no control over the terminology that
textbook authors use. This discussion is just noise.
Re: [std-proposals] Re: Change official RAII to CADRe Nicol Bolas 11/20/12 11:52 PM
On Tuesday, November 20, 2012 10:56:01 PM UTC-8, Arthur Tchaikovsky wrote:
It's not about me or anyone already familiar with C++. It's about making the whole language easier to learn for people who are just about to start. SBRM? How is that easier to remember to the CADRe - actual word, which when unfolded describes the technique from beginning to the end and one doesn't have to think twice in order to understand it? Resource Acquisition Is Initialization? What? What does it mean? On the other hand, Constructor Acquires Destructor Releases makes sense, is easy to remember and as I've already said, describes the whole technique from A to Z. RAII? It's horrible.

OK, you're really not getting this, so let me spell it out plainly.

1: You are not going to convince the world to drop a term in common usage just because you've come up with a better name for it. RAII has a 10 year head start on you. It's called "RAII" now. However non-indicative it may be, that's the name for it.

There's a Wikipedia article on RAII. There is no Wikipedia article on "CADRe". And there never will be (even if you write it, it will be deleted for being original research). You lost. You lost 5 years ago. The nomenclature is set. Best accept that and move on.

Names are pointless bikeshed issues that have little practical effect on things. So it takes a student 5 minutes longer to learn RAII than CADRe. They still learn it. If you show someone RAII principles, they still know what they are.

2: Even if you had unquestionable proof that new C++ students are absolutely dumbfounded by the term "RAII" and are utterly enlightened by the term "CADRe", that wouldn't be enough. The practical fact is that you're not going to unwrite thousands of pages of books and the innumerable online resources that call it "RAII." That material exists, and your unquestionable proof will not make it unexist. All adopting "CADRe" will do is confuse your students when they cease being your students and go out into the real world. Because everyone there calls it "RAII".

3: Most important of all, this forum is about discussing potential changes to the ISO/IEC 14882:2011 Standard For Programming Langauge C++. The ISO/IEC 14882:2011 Standard For Programming Langauge C++ does not mention RAII. Therefore, your suggestion does not affect ISO/IEC 14882:2011 Standard For Programming Langauge C++ in any way, shape, or form. YOU ARE VERY OFF TOPIC DISCUSSING THIS HERE AT ALL!
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/25/12 8:52 AM
YOU ARE VERY OFF TOPIC DISCUSSING THIS HERE AT ALL!
a) do not shout! you've presented many times lack of basic manners, but there is never too late to change it!
The practical fact is that you're not going to unwrite thousands of pages of books and the innumerable online resources that call it "RAII." That material exists, and your unquestionable proof will not make it unexist.
b) that's why sun is orbiting earth all the time, because there were books and the whole world believed in it.
c) "... a pattern known by the meaningless name RAII."(The Rule Of Zero, R. Martinho Fernandez, isocpp.org, 2012)

The old-fashion way of thinking must change for the good of C++. Nothing is ever set in stone. And if it is and is wrong, throw this stone away.
Re: [std-proposals] Re: Change official RAII to CADRe Ville Voutilainen 11/25/12 9:52 AM
On 25 November 2012 18:52, Arthur Tchaikovsky <atch...@gmail.com> wrote:
> b) that's why sun is orbiting earth all the time, because there were books
> and the whole world believed in it.

RAII is not an incorrect term, and it's not a standard term, and the
discussion of
it doesn't belong here.

> c) "... a pattern known by the meaningless name RAII."(The Rule Of Zero, R.
> Martinho Fernandez, isocpp.org, 2012)

The article actually words it "by the not very descriptive name RAII."

> The old-fashion way of thinking must change for the good of C++. Nothing is
> ever set in stone. And if it is and is wrong, throw this stone away.

I fail to see what this off-topic CADRe suggestion does for the good
of C++, nor do I
see anything substantially wrong with the alleged old-fashion
thinking. It's about
time to stop discussing this subject here.
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/25/12 10:59 PM

The article actually words it "by the not very descriptive name RAII."

No, you are wrong. The article words it with the exact words I've cited, that's why I've referenced it, and it says:

"In C++ the destructors of objects with automatic storage duration are invoked whenever their scope ends. This property is often used to handle cleanup of resources automatically in a pattern known by the meaningless name RAII."

I just wonder, how could you not see it?
Re: [std-proposals] Re: Change official RAII to CADRe Nicol Bolas 11/25/12 11:55 PM


On Sunday, November 25, 2012 10:59:59 PM UTC-8, Arthur Tchaikovsky wrote:

The article actually words it "by the not very descriptive name RAII."

No, you are wrong. The article words it with the exact words I've cited, that's why I've referenced it, and it says:

"In C++ the destructors of objects with automatic storage duration are invoked whenever their scope ends. This property is often used to handle cleanup of resources automatically in a pattern known by the meaningless name RAII."

I just wonder, how could you not see it?


Because he's looking at the actual article. The excerpt on the C++ page is inaccurate, likely because the article was revised after the excerpt was taken.

Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/26/12 12:10 AM
This just proves my point: RAII is at best not very descriptive, at worst meaningless.
Re: [std-proposals] Re: Change official RAII to CADRe Ville Voutilainen 11/26/12 12:36 AM
On 26 November 2012 10:10, Arthur Tchaikovsky <atch...@gmail.com> wrote:
> This just proves my point: RAII is at best not very descriptive, at worst
> meaningless.

Whatever point you're trying to make is still off-topic here. Also,
RAII is at least
correct, whereas CADRe isn't:

#include <memory>

struct MyHandle
{
        std::shared_ptr<int> handle_;
};

int main()
{
        MyHandle m{std::make_shared<int>(42)};
}

"Constructor acquires"? There's no constructor for MyHandle in sight.
That's probably
one of the reasons RAII states that resource acquisition is
_initialization_, because
not all initialization is construction.

Now, go convince the C++ book authors that they need to change their
terminology.
It's not a standard proposal, so it's pointless to spam about it here.
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/26/12 1:07 AM
" "Constructor acquires"? There's no constructor for MyHandle in sight."

What do you mean there is no ctor in sight? You initialize MyHandle
via default, compiler generated ctor. What do you think is happening
there?

"It's not a standard proposal, so it's pointless to spam about it here."

I do not spam, I'm more than happy for moderator to move this thread
to std::discussion forum. But I do not spam.
> --
>
>
>
>
Re: [std-proposals] Re: Change official RAII to CADRe Ville Voutilainen 11/26/12 1:15 AM
On 26 November 2012 11:07, Arthur Tchaikovsky <atch...@gmail.com> wrote:
> " "Constructor acquires"? There's no constructor for MyHandle in sight."
> What do you mean there is no ctor in sight? You initialize MyHandle
> via default, compiler generated ctor. What do you think is happening
> there?

Aggregate initialization is happening, and the handle_ member is not initialized
by a constructor.


> "It's not a standard proposal, so it's pointless to spam about it here."
> I do not spam, I'm more than happy for moderator to move this thread
> to std::discussion forum. But I do not spam.

This wouldn't be any more on-topic on std-discussion either. If you claim
you don't spam, then by all means stop doing it, because this whole
thread is nothing but off-topic spam, and you continue doing it despite
people pointing it out and requesting this discussion to be stopped.
What a moderator should do is give you a fortnight ban, perhaps that
would help the message sink in.
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/26/12 1:25 AM
"Aggregate initialization is happening, and the handle_ member is not
initialized
by a constructor."

 Your example does not illustrate RAII technique.


On 11/26/12, Ville Voutilainen <ville.vo...@gmail.com> wrote:
> --
>
>
>
>
Re: [std-proposals] Re: Change official RAII to CADRe Sebastian Gesemann 11/26/12 3:32 AM
On Mon, Nov 26, 2012 at 9:36 AM, Ville Voutilainen wrote:
>
> Whatever point you're trying to make is still off-topic here. Also,
> RAII is [...]

No "also...", please. There is really no need to say more than "It's
off-topic." unless you want Arthur to respond to an off-topic comment
with another off-topic comment. The chance of him being the first one
to stop being off-topic seems to be close to zero. Let's lead by
example.

Cheers!
SG
Re: [std-proposals] Re: Change official RAII to CADRe ri...@longbowgames.com 11/26/12 3:33 AM
Listen, I know that "someone is wrong on the Internet", but it's probably best for everyone to just stop replying to this thread.

Arthur, you have my blessing to call it CADRe.
Re: [std-proposals] Re: Change official RAII to CADRe Arthur Tchaikovsky 11/26/12 3:36 AM
@rick
Thanks for the link. Really (really) needed this bit of humor ;)

On 11/26/12, ri...@longbowgames.com <ri...@longbowgames.com> wrote:
> Listen, I know that "someone is wrong on the Internet
> <http://xkcd.com/386/>",
> but it's probably best for everyone to just stop replying to this thread.
>
> Arthur, you have my blessing to call it CADRe.
>
> --
>
>
>
>
More topics »