Topic: new function syntax
Author: REH <spamjunk@stny.rr.com>
Date: Thu, 18 Jun 2009 18:31:16 CST Raw View
Regarding the new function syntax for C++0x, that is:
auto func(int x, int y) -> int;
I think this would have been cleaner and clearer:
auto func(int x, int y) return int;
Was that ever considered?
REH
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: CornedBee <wasti.redl@gmx.net>
Date: Sat, 20 Jun 2009 01:54:58 CST Raw View
On Jun 19, 2:31 am, REH <spamj...@stny.rr.com> wrote:
> Regarding the new function syntax for C++0x, that is:
>
> auto func(int x, int y) -> int;
>
> I think this would have been cleaner and clearer:
>
> auto func(int x, int y) return int;
>
> Was that ever considered?
Probably. I did some digging in the open-std archives, but it turns
out that all papers on the new function syntax use -> as a given,
referring to "C++ re ector message c++std-ext-5364" by Stroustrup for
discussion of the issue. The problem is that this reflector seems to
be either not archived or otherwise not even publicly accessible - I
can't find a way to get at the contents of this message.
Sebastian
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]