From 8495809412313467771
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,47ad86575b18887f
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-07-18 08:05:08 PST
Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!212.74.64.35!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: "C. M. Heard" <heard@vvnet.com>
Newsgroups: comp.std.c++
Subject: Re: unnamed namespace quesion
Date: Wed, 18 Jul 2001 15:03:17 GMT
Organization: none
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <%9657.11405$Up.339914@sea-read.news.verio.net>
References: <JhK47.359227$p33.7267027@news1.sttls1.wa.home.com>
            <3B54E127.E35402FF@wizard.net>
X-Trace: mail2news.demon.co.uk 995468654 mail2news:26960 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
NNTP-Posting-Date: Wed, 18 Jul 2001 02:05:47 GMT
Lines: 38
Xref: archiver1.google.com comp.std.c++:6590

James Kuyper Jr. wrote:
> Paul Mensonides wrote:
[ ... ]
> > If it isn't, it should be.  Defining functions in a nested fashion is
> > annoying, and it makes me (and possibly others) prefer 'static' functions:
> >
> > static void f() {
> >     return;
> > }
> 
> That use of static is officially deprecated, in favor of the following:
> 
> > namespace {
> >     void f() {
> >         return;
> >     }
> > }

That's incorrect.  Namespace scope objects are deprecated, but namespace
scope functions are are not.  Interestingly, core language issues #167
and #174 suggested that this be rectified, but in opposite ways:  #167
proposed to deprecate namespace scope static functions, while #174 proposed
to reverse the deprecation of namespace scope static objects.  Both of
these have been subsumed under issue #223.

Mike

P.S.  I happen to agree with Mr. Mensonides and with the proposal in core
language issue #174.  It's not at all obvious to me why declaring namespace
scope static functions or objects is a bad thing to do  (other than,
perhaps, the unintuitive overloading of the word "static").

---
[ 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://www.research.att.com/~austern/csc/faq.html                ]



