From -1659027757764583238
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,74637d148a591f02
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-03-27 16:40:56 PST
Path: supernews.google.com!sn-xit-02!supernews.com!feed1.uncensored-news.com!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: James Dennett <jdennett@acm.org>
Newsgroups: comp.std.c++
Subject: Re: Proposal: two real uses for the "auto" keyword
Date: Tue, 27 Mar 2001 18:37:56 CST
Organization: Altopia Corp. - Usenet Access - http://www.altopia.com
Lines: 38
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <3AC0958B.62091812@acm.org>
References: <052201c0b4ab$603e8050$0500a8c0@dragonsys.com>
	 <99l3nf$7n0$1@news-int.gatech.edu> <+zJqQ9Afowv6Ews1@ntlworld.com>
	 <3ABF4E68.14646D4E@acm.org> <umA+F7AF5Fw6Ewn5@ntlworld.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <devnull@stump.algebra.com>
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)
Resent-From: fjh@cs.mu.OZ.AU
Resent-Message-Id: <200103272300.JAA13703@hg.cs.mu.oz.au>
X-NNTP-Posting-Host: jamesd.demon.co.uk:194.222.230.41
X-Trace: news.demon.co.uk 985699724 nnrp-08:8241 NO-IDENT jamesd.demon.co.uk:194.222.230.41
X-Complaints-To: abuse@demon.net
X-Accept-Language: en
Resent-Date: Wed, 28 Mar 2001 09:00:44 +1000
Resent-To: fjh+csc-submit@cs.mu.OZ.AU
Xref: supernews.google.com comp.std.c++:4044

Francis Glassborow wrote:
> 
> In article <3ABF4E68.14646D4E@acm.org>, James Dennett <jdennett@acm.org>
> writes
> >Francis Glassborow wrote:
> >>
> >> In article <99l3nf$7n0$1@news-int.gatech.edu>, Brian McNamara!
> >> <gt5163b@prism.gatech.edu> writes
> >> >(As an aside, I am curious why function declarations are even allowed
> >> >inside functions.)
> >>
> >> Almost certainly for compatibility with C.
> >
> >Would it be sensible to consider deprecating this feature,
> >or removing it altogether?  It seems to give no significant
> >benefit, and plenty of pain.
> 
> I think the pain would still be there unless you want to deprecate
> member function declarations in classes:)

How so?  It's not legal to initialize non-static data members of
classes, so there's no chance of confusing an initialized data member
with a method declaration.  The only initializations we allow in
class definitions are for integral types, IIRC.  As far as I can
see, there's no possibility of the problematic ambiguity arising
inside a class definition.

If I'm wrong, I'm sure you (or another language lawyer ;) will
detail why.

-- James Dennett

---
[ 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                ]



