220 11286 <fd784f28-1868-46d2-a211-8970b01388f9@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: walter1234 <walter2bz@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: return type sugar (orthogonal to auto foo() {} )
Date: Thu, 12 Jun 2014 12:14:20 -0700 (PDT)
Lines: 62
Approved: news@gmane.org
Message-ID: <fd784f28-1868-46d2-a211-8970b01388f9@isocpp.org>
References: <30a83c0d-00e6-462a-822e-a1789787ec05@isocpp.org>
 <CAGdQazdTYTYvwt6gDqU5U2WBeHaU4G8-za85D6OQ+Lp+xpeq2w@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_3921_12570385.1402600460518"
X-Trace: ger.gmane.org 1402600472 10016 80.91.229.3 (12 Jun 2014 19:14:32 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 12 Jun 2014 19:14:32 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDO7FOW36ILRBDPY46OAKGQEXMHD7LA@isocpp.org Thu Jun 12 21:14:25 2014
Return-path: <std-proposals+bncBDO7FOW36ILRBDPY46OAKGQEXMHD7LA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pd0-f197.google.com ([209.85.192.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDO7FOW36ILRBDPY46OAKGQEXMHD7LA@isocpp.org>)
	id 1WvAS7-0005aU-JH
	for gclcip-std-proposals@m.gmane.org; Thu, 12 Jun 2014 21:14:23 +0200
Original-Received: by mail-pd0-f197.google.com with SMTP id ft15sf5175149pdb.8
        for <gclcip-std-proposals@m.gmane.org>; Thu, 12 Jun 2014 12:14:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=Qai+mMFDGr908cCPLNlHX9bIdYqCetS/Fpctv6nMt5o=;
        b=A44bBODARfdcdUi+mtR0XFRK65ruCvySrjbpvoiADT0AVFK5KS7F19FwxOR6IdKfDO
         KdM9ELMkvrATFPaMSgbtuo5RlizNXEjHWoSEgqhDgYfk8A6yx0ffUNLwJHatFTMgd6mY
         +cqIwKrmo/ov7THFejoyWq3wlZmNTZfenMpLr3ZH4+omU7OGTVfhhZWtrSt3kzZklCut
         W5yemij9IRd3oS32pLDSLDqktaQK23mJ8oe4zfvrLumUFShFbCywG3AfYKxNei5a6BIb
         jrK3EOqA5Lr+GLIDAF7WLkD7YC77Yserj18sTRIsjKUNxEPcyjwbaEoUq8eToQ130WVO
         c12w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=Qai+mMFDGr908cCPLNlHX9bIdYqCetS/Fpctv6nMt5o=;
        b=gTWS9P4cti/n+hsODr6PAazeFfveAeKSRJQqxC7a9uTSVGQhpp6S/Ou6bKq2eKreeh
         DtqiNKLECemJamAY3Z2qhpU1TbSZLN9jmJfFWFLhA5Gb9Jgjyr8RhV3cREWFIMLJPjZ5
         57Vzu/haHd7rdhf76KQSGRfjlckNViLruFB9h8G18j6CL2HR+knc8nID6JWzg3DmkEP8
         JgHpymbxmVw0fJRs16Akj/mZkDHqFi44UbyxXbwDp3rYHgv3Hwuyz9Ls26PB98jsNdOU
         Yt6p3S//8XgU43cfHPCLrEGVpPxYBLv7WYqPmox6IHwtVdISpdSH5UDjFL+lqq53p6jX
         o7sQ==
X-Gm-Message-State: ALoCoQkTrHbeHpbdXgt9v4MLHqyNO07MR5Ec5lxZk/HeyALcFhAKFyzIta8L+QNoO75hJShSf9v+
X-Received: by 10.68.133.138 with SMTP id pc10mr1201681pbb.5.1402600462522;
        Thu, 12 Jun 2014 12:14:22 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.92.68 with SMTP id a62ls1062864qge.79.gmail; Thu, 12 Jun
 2014 12:14:21 -0700 (PDT)
X-Received: by 10.140.37.172 with SMTP id r41mr84831qgr.3.1402600461605;
        Thu, 12 Jun 2014 12:14:21 -0700 (PDT)
In-Reply-To: <CAGdQazdTYTYvwt6gDqU5U2WBeHaU4G8-za85D6OQ+Lp+xpeq2w@mail.gmail.com>
X-Original-Sender: walter2bz@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:11286
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/11286>

------=_Part_3921_12570385.1402600460518
Content-Type: text/plain; charset=UTF-8

auto foo(...) {return...}   is certainly a great thing to have.

the benefit of the type being in the signature however, is discoverability 
and documentation - you may see many single line function prototypes in a 
header, or you may have function bodies hidden.   You may search for a 
function by virtue of knowing what you want it to create.

The use that made me think of this was prototyping, even when functions are 
inline and in headers, you still sometimes want to prototype them above so 
that other functions can refer to them. Sometimes you want to separate out 
".h" with just prototypes and ".inl" with inline function bodies.

I realise it might be possible to address the 'documentation' issue with an 
IDE, which can deduce the types and show you in autocomplete/or function 
browsers.

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_3921_12570385.1402600460518
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">auto foo(...) {return...} &nbsp; is certainly a great thin=
g to have.<div><br><div>the benefit of the type being in the signature howe=
ver, is discoverability and documentation - you may see many single line fu=
nction prototypes in a header, or you may have function bodies hidden. &nbs=
p; You may search for a function by virtue of knowing what you want it to c=
reate.</div></div><div><br></div><div>The use that made me think of this wa=
s prototyping, even when functions are inline and in headers, you still som=
etimes want to prototype them above so that other functions can refer to th=
em. Sometimes you want to separate out ".h" with just prototypes and ".inl"=
 with inline function bodies.</div><div><br></div><div>I realise it might b=
e possible to address the 'documentation' issue with an IDE, which can dedu=
ce the types and show you in autocomplete/or function browsers.</div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_3921_12570385.1402600460518--

.
