220 19900 <CANu6V4U6Netx_rbpzfpfr7mO2J_NFgUCQn06SQ3ae4MoHpstGw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: "'Johannes Schaub' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: default arguments
Date: Tue, 18 Aug 2015 19:28:40 +0200
Lines: 34
Approved: news@gmane.org
Message-ID: <CANu6V4U6Netx_rbpzfpfr7mO2J_NFgUCQn06SQ3ae4MoHpstGw@mail.gmail.com>
References: <ef9c7cbe-e8f1-4196-83bc-11a1c9b2798c@isocpp.org>
	<CANu6V4UOxgZ9GV9f8DTbtW6BXrBPA7_2yUDRyhXv5BptvybHFA@mail.gmail.com>
	<ab64c760-eeca-426a-953f-99d7a19919f6@isocpp.org>
	<CAD6_Qj_SkX1r_Egr0FHgk21ASVQuDkYrn1Cy7+dRAJFwHpG72w@mail.gmail.com>
	<mqvdv7$6tc$1@ger.gmane.org>
	<7066b166-9472-4ad6-ac3c-2db527ed7818@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1439918923 22400 80.91.229.3 (18 Aug 2015 17:28:43 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 18 Aug 2015 17:28:43 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCQPNCEZSQNBBSOWZWXAKGQEXYRY65I@isocpp.org Tue Aug 18 19:28:43 2015
Return-path: <std-proposals+bncBCQPNCEZSQNBBSOWZWXAKGQEXYRY65I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qg0-f72.google.com ([209.85.192.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCQPNCEZSQNBBSOWZWXAKGQEXYRY65I@isocpp.org>)
	id 1ZRkgk-0006MJ-PF
	for gclcip-std-proposals@m.gmane.org; Tue, 18 Aug 2015 19:28:42 +0200
Original-Received: by qgeb6 with SMTP id b6sf185562964qge.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 18 Aug 2015 10:28:41 -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: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=rG/j2Vx3JxplIva7HUOfkA57WbyqUOGNduYud0KKx0A=;
        b=DI+5Oh6pF+3i7kqWWmyxGRtf174bahBY9X36Pupe8dQpA1ZPtoiVmzHC2gUjJtXlol
         YoWGtk9LdGdJtQ2Eaxy2MFKaDRs891ITuMjXUOXOvBRakx1CPvMFzLux4UbizspRHktj
         jECKwb8wB/BSJjrzB4VijVl6ivq6fld1bxRvzq26ZUWofIULibRUox9qP7ha7iwKULe9
         0vM5u3q1Q8qMWsqnqm0ZZ2vzprQAeyB3uGdZa4xYVglrZNIkvI//SR5FdAySnc9paIFD
         wqy8tdB7V13byMD3bqCBogd4JQHilVGgixptRfWlROOFsJcgncvZYTcCSPef4o7RA2fq
         yoWw==
X-Gm-Message-State: ALoCoQnVmcLR0JnOoiaq7a7o5UxAhrvXtpEslkC9KBH0+rthJIkTWHHRcaQybdNBP7nxqxVWrQSO
X-Received: by 10.52.97.101 with SMTP id dz5mr6837311vdb.14.1439918921542;
        Tue, 18 Aug 2015 10:28:41 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.83.102 with SMTP id p6ls1321176igy.19.canary; Tue, 18 Aug
 2015 10:28:40 -0700 (PDT)
X-Received: by 10.107.19.94 with SMTP id b91mr7681424ioj.144.1439918920888;
        Tue, 18 Aug 2015 10:28:40 -0700 (PDT)
Original-Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com. [2607:f8b0:4001:c05::22f])
        by mx.google.com with ESMTPS id z3si10168240igl.13.2015.08.18.10.28.40
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 18 Aug 2015 10:28:40 -0700 (PDT)
Received-SPF: pass (google.com: domain of schaub.johannes@googlemail.com designates 2607:f8b0:4001:c05::22f as permitted sender) client-ip=2607:f8b0:4001:c05::22f;
Original-Received: by igfj19 with SMTP id j19so85728179igf.1
        for <std-proposals@isocpp.org>; Tue, 18 Aug 2015 10:28:40 -0700 (PDT)
X-Received: by 10.50.87.74 with SMTP id v10mr24257344igz.37.1439918920649;
 Tue, 18 Aug 2015 10:28:40 -0700 (PDT)
Original-Received: by 10.79.81.199 with HTTP; Tue, 18 Aug 2015 10:28:40 -0700 (PDT)
In-Reply-To: <7066b166-9472-4ad6-ac3c-2db527ed7818@isocpp.org>
X-Original-Sender: schaub.johannes@googlemail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of schaub.johannes@googlemail.com designates 2607:f8b0:4001:c05::22f
 as permitted sender) smtp.mailfrom=schaub.johannes@googlemail.com;
       dkim=pass header.i=@googlemail.com;       dmarc=pass (p=QUARANTINE
 dis=NONE) header.from=googlemail.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>
X-Original-From: Johannes Schaub <schaub.johannes@googlemail.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:19900
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/19900>

2015-08-18 18:37 GMT+02:00 Arthur Tchaikovsky <atch.cpp@gmail.com>:
> I dear to disagree with the statement that the following example is self
> documenting and easier to read:
> auto c3ptr = new C{.timeout = 1};
> How is this^^^ easier to read? And how is this self documenting? Only on
> surface it seems that it is, both, but when you really think about it it is
> neither self documenting nor easy to read. Why? Because having only one
> argument initialized in {}, that is .timeout, leaves us with question, is
> that the only argument to that class, or are there any other? If so, are
> those arguments inited by default? If so, how many? Etc.
> Compared to this:
> auto c3ptr = new C(default, 1); // use a shorter timeout
> It is immediately obvious how many arguments there are and which one of them
> are default. And as for self documentation?

Err, no. There may be other parameters that have default arguments,
that you don't see aswell. So you don't see all parameter's
initializer values in both versions. So I fail to understand your
argument. I even fail earlier, without finding the counter example.
Why would you even care about the other arguments values? Do you care
about values that might influence the constructor's behavior that are
*not* passed as arguments but by another way, perhaps read as globals?

In summary, I think you are trying to find arguments against ".timeout
= ..." and come up with not-so-convincing examples.

-- 

--- 
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/.

.
