220 10466 <CANPtknxyi1minKbkGeWdEZ0ZW9KCemiz5omypbnyJZ+RqntLKA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Peter Koch Larsen <peter.koch.larsen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Add compiler time attributes like c#
Date: Thu, 1 May 2014 14:41:10 +0200
Lines: 50
Approved: news@gmane.org
Message-ID: <CANPtknxyi1minKbkGeWdEZ0ZW9KCemiz5omypbnyJZ+RqntLKA@mail.gmail.com>
References: <e9533cfc-f35c-4313-aaaf-a6d3d8aa00f9@isocpp.org>
	<CAOU91OOiEnyF6m=8hetJxCsBxs1UkRYu3xn_LOFuMk0xuv8WcQ@mail.gmail.com>
	<85900e94-bdc6-45eb-87ec-d3fd9e43d4cd@isocpp.org>
	<105e6e46-2830-4ac3-b2a9-17f402b35466@isocpp.org>
	<0560616f-101c-4428-99a2-fb80f22b1959@isocpp.org>
	<CANPtknz2pqFCidvJNFGOO89Ex0nFQguvtxmatAA0=Utfvp=U4Q@mail.gmail.com>
	<a826a8f8-e6cc-42ad-9378-6824e31a2ff3@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 1398948079 11731 80.91.229.3 (1 May 2014 12:41:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 1 May 2014 12:41:19 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDRIBXXKZQERBZUBRGNQKGQESB4R42A@isocpp.org Thu May 01 14:41:13 2014
Return-path: <std-proposals+bncBDRIBXXKZQERBZUBRGNQKGQESB4R42A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ve0-f197.google.com ([209.85.128.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDRIBXXKZQERBZUBRGNQKGQESB4R42A@isocpp.org>)
	id 1WfqIZ-0007hw-O6
	for gclcip-std-proposals@m.gmane.org; Thu, 01 May 2014 14:41:12 +0200
Original-Received: by mail-ve0-f197.google.com with SMTP id sa20sf10616493veb.8
        for <gclcip-std-proposals@m.gmane.org>; Thu, 01 May 2014 05:41:10 -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:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=73jZmGS9NjIGCJE+bVhNshkpvlXToyw6JQh/ZOHch90=;
        b=iG+gk446enAujkxrh3jUUabhnpzF24VjL1y5ge1tSKc9v7CTGIE8GJU1WATgsLv+Un
         4RFCe8hzwnGHK/HpoJyQiXNV/rWHleW0v7PcsQbdeUi9EhwBZFInrpjryu99JahTSvBc
         u9e3eXG9uFHvPVF4AR0tq6NMbMYxGwA0nppgvcASTi6nDUDUWwx1LH/TX0qsPfpNPfQ9
         QO5Air4/lqqjdlnb24wfJt4ysKBF3J0gI1LNQsCLmv2i2Feo7YWWNdesfZKmBn8auUPN
         SUo3j8XNIxengSUB5M4w0QXxaWMOewHCrF8onZsHMXLbB2fFFIaGSMUpShz/7uv3/2D1
         FX4Q==
X-Gm-Message-State: ALoCoQmeYkEB+w4j9EtLkHVDKFLv5AXzMCN/8qiPq45PpnOs21uJDVMVv0Urr5KaC5semFOR9wUp
X-Received: by 10.236.39.99 with SMTP id c63mr5148957yhb.31.1398948070827;
        Thu, 01 May 2014 05:41:10 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.38.72 with SMTP id s66ls1008938qgs.85.gmail; Thu, 01 May
 2014 05:41:10 -0700 (PDT)
X-Received: by 10.221.26.10 with SMTP id rk10mr8856932vcb.0.1398948070165;
        Thu, 01 May 2014 05:41:10 -0700 (PDT)
Original-Received: from mail-ve0-x235.google.com (mail-ve0-x235.google.com [2607:f8b0:400c:c01::235])
        by mx.google.com with ESMTPS id dl6si6029076veb.127.2014.05.01.05.41.10
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 01 May 2014 05:41:10 -0700 (PDT)
Received-SPF: pass (google.com: domain of peter.koch.larsen@gmail.com designates 2607:f8b0:400c:c01::235 as permitted sender) client-ip=2607:f8b0:400c:c01::235;
Original-Received: by mail-ve0-f181.google.com with SMTP id pa12so2773132veb.40
        for <std-proposals@isocpp.org>; Thu, 01 May 2014 05:41:10 -0700 (PDT)
X-Received: by 10.221.62.131 with SMTP id xa3mr8757699vcb.13.1398948070093;
 Thu, 01 May 2014 05:41:10 -0700 (PDT)
Original-Received: by 10.220.215.142 with HTTP; Thu, 1 May 2014 05:41:10 -0700 (PDT)
In-Reply-To: <a826a8f8-e6cc-42ad-9378-6824e31a2ff3@isocpp.org>
X-Original-Sender: peter.koch.larsen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of peter.koch.larsen@gmail.com designates 2607:f8b0:400c:c01::235 as
 permitted sender) smtp.mail=peter.koch.larsen@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-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:10466
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/10466>

On 4/30/14, gmisocpp@gmail.com <gmisocpp@gmail.com> wrote:
> Hi
>
> On Thursday, May 1, 2014 7:15:50 AM UTC+12, Peter Koch Larsen wrote:
>>
>> If you are not using the argument, I fail to see why you would want to
>> look at it in the debugger.
>>
>> /Peter
>>
>
> You're not using it currently, it doesn't mean you don't  intend to use it
> later, you still want to verify that it has the right value should there
> come a time when you want to use it, right?

But then you use it! As mentioned elsewhere, it is likely that
compilers optimise stuff away for unused variables. So assume
(nontested code so beware)

int foo(int i, int, int k) { return i + k; }
....
foo(3,4,5);

A good guess is that this code generates the same binary as would

int foo(int i, int k) { return i + k; }
....
foo(3,5);



>
> And you'd still like to name it, because it makes the code more readable,
> right?
>
You can name the variables in the declaration. It is in the definition
you omit the names.
There you will likely need a comment anyway.

/Peter
[snip]

-- 

--- 
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/.

.
