220 19886 <CAEhD+6A1zF9RhsM+W+-mOCJHYNqxkpXp8H0+WGFqX=Oq+6Ry1Q@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Andrey Semashev <andrey.semashev@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: default arguments
Date: Tue, 18 Aug 2015 13:39:21 +0300
Lines: 45
Approved: news@gmane.org
Message-ID: <CAEhD+6A1zF9RhsM+W+-mOCJHYNqxkpXp8H0+WGFqX=Oq+6Ry1Q@mail.gmail.com>
References: <ef9c7cbe-e8f1-4196-83bc-11a1c9b2798c@isocpp.org>
	<CANu6V4UOxgZ9GV9f8DTbtW6BXrBPA7_2yUDRyhXv5BptvybHFA@mail.gmail.com>
	<ab64c760-eeca-426a-953f-99d7a19919f6@isocpp.org>
	<CANu6V4VPpUSpZPuZuvFf9_-fvUTSVDB=pLvDDOham6NFgo6eQg@mail.gmail.com>
	<1e7b94e7-364a-419d-9b12-6706ddef0fef@isocpp.org>
	<CAD6_Qj-POB_bEgjGVbqNWz45RchPHn=W-emNjk0FJY10SCZGiQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1439894365 553 80.91.229.3 (18 Aug 2015 10:39:25 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 18 Aug 2015 10:39:25 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCXY5TXHWYJRBWUWZSXAKGQEUKUV5JI@isocpp.org Tue Aug 18 12:39:25 2015
Return-path: <std-proposals+bncBCXY5TXHWYJRBWUWZSXAKGQEUKUV5JI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ig0-f200.google.com ([209.85.213.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCXY5TXHWYJRBWUWZSXAKGQEUKUV5JI@isocpp.org>)
	id 1ZReId-0006Lj-Kg
	for gclcip-std-proposals@m.gmane.org; Tue, 18 Aug 2015 12:39:23 +0200
Original-Received: by igbjg10 with SMTP id jg10sf173983922igb.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 18 Aug 2015 03:39:22 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:content-type:content-transfer-encoding
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=YUXTi70b+nwPmIT7RrFwrjM3YHeL7SZYWxZKvSSQi1E=;
        b=OX+tQ6SYMo7qsHw0NF4V07qoWAnVjdGkdw/qRCp/2HX6b2sVNmcn0yfUY3JeTS/OxT
         BjmRg7l+7dsRELrGfYYU6EPUzNNCJPgG+zHujuS1F66/9gdelTAxhSfhi1/JpM4b0uT7
         +7GhyMHDiV6GO2WFeSgFPe44o+BVIx70hY48FLMojQUg2Hzif4Ng7OTYthhMLQbbNTR+
         J3ScUvRFcQHKqosDripXY7mSWrzs6h+se/J4EBCanB9i+O22wp5EHDkNQZk7rwqV524q
         nyIVxUG+HeLS0NS6ArzRCszK4nwIxKWngH7UgUbrESgY1VU84vOfs02P6MYdKhbpAhFR 
X-Gm-Message-State: ALoCoQlCEwsY87wZIkgxt8AbyXVbSaB60mjFwxKcDbGWxEnuzWxzn7ftpvMPRU0c+ZbER8g+hxYl
X-Received: by 10.182.85.197 with SMTP id j5mr5027268obz.23.1439894362390;
        Tue, 18 Aug 2015 03:39:22 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.122.106 with SMTP id lr10ls1307849igb.9.gmail; Tue, 18 Aug
 2015 03:39:21 -0700 (PDT)
X-Received: by 10.50.36.7 with SMTP id m7mr5700790igj.96.1439894361824;
        Tue, 18 Aug 2015 03:39:21 -0700 (PDT)
Original-Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com. [2607:f8b0:4001:c05::231])
        by mx.google.com with ESMTPS id 80si11899003iol.73.2015.08.18.03.39.21
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 18 Aug 2015 03:39:21 -0700 (PDT)
Received-SPF: pass (google.com: domain of andrey.semashev@gmail.com designates 2607:f8b0:4001:c05::231 as permitted sender) client-ip=2607:f8b0:4001:c05::231;
Original-Received: by igui7 with SMTP id i7so78990918igu.1
        for <std-proposals@isocpp.org>; Tue, 18 Aug 2015 03:39:21 -0700 (PDT)
X-Received: by 10.50.97.71 with SMTP id dy7mr22040943igb.76.1439894361690;
 Tue, 18 Aug 2015 03:39:21 -0700 (PDT)
Original-Received: by 10.79.98.1 with HTTP; Tue, 18 Aug 2015 03:39:21 -0700 (PDT)
In-Reply-To: <CAD6_Qj-POB_bEgjGVbqNWz45RchPHn=W-emNjk0FJY10SCZGiQ@mail.gmail.com>
X-Original-Sender: andrey.semashev@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of andrey.semashev@gmail.com designates 2607:f8b0:4001:c05::231 as
 permitted sender) smtp.mailfrom=andrey.semashev@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:19886
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/19886>

On Tue, Aug 18, 2015 at 1:25 PM, David Rodr=C3=ADguez Ibeas <dibeas@ieee.or=
g> wrote:
>
>
> On Tue, Aug 18, 2015 at 11:22 AM, Arthur Tchaikovsky <atch.cpp@gmail.com>
> wrote:
>>
>> I gotta be honest with you Johann, I simply don't buy it.
>> And index notion looks anything but elegant solution. That is my opinion
>> of course.
>>
>
> You  might not find it elegant, but it is a feature that has been present=
 in
> C for some time (to initialize objects) so there is prior art. It is also
> tested and the shortcomings are known --at least for initialization, whic=
h
> is not really the same as defaulting arguments to functions or constructo=
rs.

Structure members have stable names, function parameters do not and in
fact may have no names. I do find Boost.Parameter named parameters
useful sometimes, but with the existing rules defined by the standard
wrt function declarations I really doubt the named function arguments
will appear in the language as easily as you suggest. I would find
named member initializations for structs extremely useful though, as I
constantly find myself worrying that braced initialization will get
screwed when the order of the struct members changes.

About the original proposal (i.e. the use of the 'default' keyword to
designate default argument values), I like it. Not that I often need
something like that but sometimes that would be useful, at least to
decouple the interface from the user.

--=20

---=20
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 e=
mail 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-proposa=
ls/.

.
