Topic: static" static (a.k.a. no_destroy keyword proposal)
Author: David R Tribble <david@tribble.com>
Date: 1999/10/21 Raw View
James Kuyper Jr. wrote:
>
> "blargg postmaster@nospam.gov" wrote:
>> Is this all a joke that I don't realize?
>
> Apparently. "auto" is never needed, which means it's almost never
> used, not even in ancient legacy code. Which makes it a favorite joke
> candidate for re-use of existing keywords. The other favorite is
> 'static', for the opposite reason: it has too many uses already.
FWIW, I made proposal to the ISO C9X committee that the 'auto'
keyword be deprecated, precisely for the reasons given by James.
The committee rejected it, though, on the the grounds that it
provides a convenient way of explaining what "automatic local storage"
is, since all of the other linkage types have keywords associated
with them. They also feared that it would break existing code
(presumably machine-generated).
-- David R. Tribble, david@tribble.com, http://www.david.tribble.com --
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: postmast.root.admi.gov@iname.com (blargg) (postmaster@nospam.gov)
Date: 1999/10/14 Raw View
In article <7tvl6t$fv4@library2.airnews.net>, "Bill Wade"
<bill.wade@stoner.com> wrote:
> blargg (postmaster@nospam.gov) wrote in message ...
>
> >Is this all a joke that I don't realize?
>
> Yes. The presence of various smiley's such as ;-) or :-) usually means the
> author was happy about something, or thought he said something funny.
>
> I'll try to cut back on obscure humor. It wastes bandwith, your time
> (trying to get it), and mine (trying to explain it).
I saw the smileys, but the text just didn't seem at all funny, so I
figured it was a different kind of humor (not sarcasm). I should have
realized that this whole branch was just silly "static" static, reusing an
already over-reused keyword.
No time wasted.
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Bill Wade" <bill.wade@stoner.com>
Date: 1999/10/14 Raw View
blargg (postmaster@nospam.gov) wrote in message ...
>Is this all a joke that I don't realize?
Yes. The presence of various smiley's such as ;-) or :-) usually means the
author was happy about something, or thought he said something funny.
I'll try to cut back on obscure humor. It wastes bandwith, your time
(trying to get it), and mine (trying to explain it).
Sorry.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "James Kuyper Jr." <kuyper@wizard.net>
Date: 1999/10/14 Raw View
"blargg postmaster@nospam.gov" wrote:
>
> In article <37FE2A16.4E0DD454@physik.tu-muenchen.de>, Christopher Eltschka
> <celtschk@physik.tu-muenchen.de> wrote:
>
> > Bill Wade wrote:
....
> > > How about using "auto" to mean no_delete? It has the following advantages:
> > >
> > > 1) It is already a keyword.
> > > 2) Nobody uses it.
>
> Except those who have source code with "auto" in it.
Do a search of any large set of code. I expect you'll be surprised by
the results.
> > But after all, we know that adding keywords is evil,
>
> We do?
You should. Think about it for a while.
....
> Is this all a joke that I don't realize?
Apparently. "auto" is never needed, which means it's almost never used,
not even in ancient legacy code. Which makes it a favorite joke
candidate for re-use of existing keywords. The other favorite is
'static', for the opposite reason: it has too many uses already.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: postmast.root.admi.gov@iname.com (blargg) (postmaster@nospam.gov)
Date: 1999/10/11 Raw View
In article <37FE2A16.4E0DD454@physik.tu-muenchen.de>, Christopher Eltschka
<celtschk@physik.tu-muenchen.de> wrote:
> Bill Wade wrote:
> >
> > Jonathan de Boyne Pollard wrote in message <37FB4EEA.1887F96C@tesco.net>...
> >
> > >I'm surprised, if keyword non-proliferation is considered to be an issue,
> > that
> > >someone hasn't suggested re-using "mutable" in some fashion.
> >
> > How about using "auto" to mean no_delete? It has the following advantages:
> >
> > 1) It is already a keyword.
> > 2) Nobody uses it.
Except those who have source code with "auto" in it.
> > 3) It already means no_delete.
It affects the storage of the object itself.
> > 4) When combined with const it already means no_explicit_destruct.
> >
> > ;-)
>
> extern ":-)"
> {
> I'm for "protected"! After all, you want to protect the
> object against deleting.
So when you're reading a piece of English prose and encounter "protected",
you immediately think "protect against deleting"?
> But after all, we know that adding keywords is evil,
We do?
> so
> we should just use the syntax "!delete". This is currently
> illegal, and it's immediatly clear what we mean:
>
> int !delete* p; // how could there be any doubt about the meaning?
Immediately clear... not to me.
Is this all a joke that I don't realize?
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Christopher Eltschka <celtschk@physik.tu-muenchen.de>
Date: 1999/10/12 Raw View
[Followup-To: poster]
"blargg postmaster@nospam.gov" wrote:
>
> In article <37FE2A16.4E0DD454@physik.tu-muenchen.de>, Christopher Eltschka
> <celtschk@physik.tu-muenchen.de> wrote:
>
> > Bill Wade wrote:
> > >
> > > Jonathan de Boyne Pollard wrote in message <37FB4EEA.1887F96C@tesco.net>...
> > >
> > > >I'm surprised, if keyword non-proliferation is considered to be an issue,
> > > that
> > > >someone hasn't suggested re-using "mutable" in some fashion.
> > >
> > > How about using "auto" to mean no_delete? It has the following advantages:
> > >
> > > 1) It is already a keyword.
> > > 2) Nobody uses it.
>
> Except those who have source code with "auto" in it.
>
> > > 3) It already means no_delete.
>
> It affects the storage of the object itself.
>
> > > 4) When combined with const it already means no_explicit_destruct.
> > >
> > > ;-)
> >
> > extern ":-)"
> > {
> > I'm for "protected"! After all, you want to protect the
> > object against deleting.
>
> So when you're reading a piece of English prose and encounter "protected",
> you immediately think "protect against deleting"?
>
> > But after all, we know that adding keywords is evil,
>
> We do?
>
> > so
> > we should just use the syntax "!delete". This is currently
> > illegal, and it's immediatly clear what we mean:
> >
> > int !delete* p; // how could there be any doubt about the meaning?
>
> Immediately clear... not to me.
>
> Is this all a joke that I don't realize?
Yes: Note that I enclosed this in
extern ":-)"
If you are in Usenet, you *must* know ":-)" and variations
(so-called smileys, sometimes they're also called emoticon),
or you will take many things for serious which were intended
as humor. If you don't understand them, lay your head to the
left side. Then the face should be obvious to you.
And another evidence of humor is that my posting ends
with "SCNR", which means "Sorry, could not resist".
Note that the article I responded to also ended with a
"standalone" smiley. A clear indication that this article
wasn't to be taken too serious as well.
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Christopher Eltschka <celtschk@physik.tu-muenchen.de>
Date: 1999/10/09 Raw View
Bill Wade wrote:
>
> Jonathan de Boyne Pollard wrote in message <37FB4EEA.1887F96C@tesco.net>...
>
> >I'm surprised, if keyword non-proliferation is considered to be an issue,
> that
> >someone hasn't suggested re-using "mutable" in some fashion.
>
> How about using "auto" to mean no_delete? It has the following advantages:
>
> 1) It is already a keyword.
> 2) Nobody uses it.
> 3) It already means no_delete.
> 4) When combined with const it already means no_explicit_destruct.
>
> ;-)
extern ":-)"
{
I'm for "protected"! After all, you want to protect the
object against deleting.
But after all, we know that adding keywords is evil, so
we should just use the syntax "!delete". This is currently
illegal, and it's immediatly clear what we mean:
int !delete* p; // how could there be any doubt about the meaning?
}
SCNR
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Bill Wade" <bill.wade@stoner.com>
Date: 1999/10/08 Raw View
Jonathan de Boyne Pollard wrote in message <37FB4EEA.1887F96C@tesco.net>...
>I'm surprised, if keyword non-proliferation is considered to be an issue,
that
>someone hasn't suggested re-using "mutable" in some fashion.
How about using "auto" to mean no_delete? It has the following advantages:
1) It is already a keyword.
2) Nobody uses it.
3) It already means no_delete.
4) When combined with const it already means no_explicit_destruct.
;-)
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Jonathan de Boyne Pollard <J.deBoynePollard@tesco.net>
Date: 1999/10/06 Raw View
Siemel B. Naran wrote:
> Valentin Bonnard <Bonnard.V@wanadoo.fr> wrote:
> > void foo (const no_destroy int* pndci, const int* pci)
>
> Earlier on this thread someone suggested we just use the 'static'
> keyword. This is better because it doesn't invent a new keyword.
Mr Koenig (I think it was he.) was alluding to the fact that "static" has too
many different meanings already when he jokingly proposed giving it yet
another one.
I'm surprised, if keyword non-proliferation is considered to be an issue, that
someone hasn't suggested re-using "mutable" in some fashion. Of course that
would mean starting from the ARM semantics of "const" implying
non-deletability in order that "const mutable" could then imply deletability.
If one were to start from the Standard C++ semantics, applying "mutable" to
"const" wouldn't have the ... <cough> ... intuitive meaning that it currently
has of "less constant in some manner than just plain `const' would be".
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]