220 4095 <CAE1+XsZWWbKwX+vJc7VQUjyRXXvmJePofKy2CP8+3ERRtTYrYw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Hariharan Subramanian <tohari@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Default values in middle parameters in a function
Date: Tue, 30 Apr 2013 11:02:40 +0530
Lines: 66
Approved: news@gmane.org
Message-ID: <CAE1+XsZWWbKwX+vJc7VQUjyRXXvmJePofKy2CP8+3ERRtTYrYw@mail.gmail.com>
References: <25d51458-9a2e-4607-9b1a-9d2a7be8df4e@isocpp.org>
	<CAGqM8fYDgZbfH6dugPnLqYvwZhSeVvC+gMVLLLx3OzYBmYByTg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=089e0158c76c79501f04db8d54a7
X-Trace: ger.gmane.org 1367299964 13397 80.91.229.3 (30 Apr 2013 05:32:44 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 30 Apr 2013 05:32:44 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCJZFFHTQQIBB6NO7WFQKGQETZSA5YY@isocpp.org Tue Apr 30 07:32:44 2013
Return-path: <std-proposals+bncBCJZFFHTQQIBB6NO7WFQKGQETZSA5YY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-bk0-f72.google.com ([209.85.214.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCJZFFHTQQIBB6NO7WFQKGQETZSA5YY@isocpp.org>)
	id 1UX3BC-0001iu-9H
	for gclcip-std-proposals@m.gmane.org; Tue, 30 Apr 2013 07:32:42 +0200
Original-Received: by mail-bk0-f72.google.com with SMTP id ik5sf160197bkc.7
        for <gclcip-std-proposals@m.gmane.org>; Mon, 29 Apr 2013 22:32:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:received-spf:mime-version
         :x-received:in-reply-to:references:date:message-id:subject:from:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-google-group-id:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=aEBP2fubQnPJ/l7BFp3rgobZ83XX2hWRnaGGImV1JLE=;
        b=KceqjO96PKXH1c5iKI1vCG0zXX6cubvhefYk1n+YuhcNw9TDWvtdQWoexCXkk68XZQ
         6cJv9Osl3hSbKQDf6+lXL8zzVTKLwj9MiGAwlRXj9un2CyhJRBCrUgVaVpumjVPI5V5Y
         vRFrjogiOadZhSwPJPH0c6Fo0zLQjw18n1tzhfvv7qvlj8q3wxExfl7zYS9b73hYOzGY
         spNw/PJ2urSJc8/O88Nbr0sof0xyaB1CwRcHiu/xZizAMd3X0hzo41wdZs0xYvKooND7
         /AChmuAXLdBvga2bmifWi988fk79XcsgX8CpzGkK6aDQrYDJzGgjpyZdQM92sDAG28Me
  
X-Received: by 10.112.155.102 with SMTP id vv6mr11421618lbb.20.1367299961965;
        Mon, 29 Apr 2013 22:32:41 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.6.34 with SMTP id x2ls5460lax.106.gmail; Mon, 29 Apr 2013
 22:32:41 -0700 (PDT)
X-Received: by 10.112.147.170 with SMTP id tl10mr27760434lbb.100.1367299961103;
        Mon, 29 Apr 2013 22:32:41 -0700 (PDT)
Original-Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172])
        by mx.google.com with ESMTPS id sp4si745687lbb.206.2013.04.29.22.32.41
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 29 Apr 2013 22:32:41 -0700 (PDT)
Received-SPF: pass (google.com: domain of tohari@gmail.com designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172;
Original-Received: by mail-lb0-f172.google.com with SMTP id o10so188599lbi.3
        for <std-proposals@isocpp.org>; Mon, 29 Apr 2013 22:32:41 -0700 (PDT)
X-Received: by 10.152.29.227 with SMTP id n3mr164730lah.42.1367299960949; Mon,
 29 Apr 2013 22:32:40 -0700 (PDT)
Original-Received: by 10.112.33.177 with HTTP; Mon, 29 Apr 2013 22:32:40 -0700 (PDT)
In-Reply-To: <CAGqM8fYDgZbfH6dugPnLqYvwZhSeVvC+gMVLLLx3OzYBmYByTg@mail.gmail.com>
X-Original-Sender: tohari@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of tohari@gmail.com designates 209.85.217.172 as permitted sender)
 smtp.mail=tohari@gmail.com;       dkim=pass header.i=@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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4095
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4095>

--089e0158c76c79501f04db8d54a7
Content-Type: text/plain; charset=ISO-8859-1

> Default parameters can vary between translation units, which is
> not good for code clarity.  They can also cause address-of-function
> problems and binary compatibility problems.  An overload set is a
> significantly better approach to the problems that default parameters
> solve.  I would rather the user wrote function overloads to handle
> the various cases.  Mostly, you can do this in an API-compatible
> manner.  So, rather than extend a flawed feature, I would rather say
> "do not do that".
>

Default parameters are a reality and used extensively. Instead of making a
"flawed feature" difficult to work with it makes this "flawed feature"
easier to work with.

-- 

--- 
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/?hl=en.



--089e0158c76c79501f04db8d54a7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><div class=3D"gmail_quote">=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Default parameters can vary between translat=
ion units, which is<br>

not good for code clarity. =A0They can also cause address-of-function<br>
problems and binary compatibility problems. =A0An overload set is a<br>
significantly better approach to the problems that default parameters<br>
solve. =A0I would rather the user wrote function overloads to handle<br>
the various cases. =A0Mostly, you can do this in an API-compatible<br>
manner. =A0So, rather than extend a flawed feature, I would rather say<br>
&quot;do not do that&quot;.<br></blockquote><div><br></div><div style>Defau=
lt parameters are a reality and used extensively. Instead of making a &quot=
;flawed feature&quot; difficult to work with it makes this &quot;flawed fea=
ture&quot; easier to work with.=A0</div>
</div></div></div>

<p></p>

-- <br />
&nbsp;<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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

--089e0158c76c79501f04db8d54a7--

.
