220 16407 <CAEWLptyqSFPT9ZbFWyi_NuFC-Mos=4n2ie8CHzKg5syvuXvHuA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Douglas Boffey <douglas.boffey@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Succinct declaration of metavariables
Date: Thu, 19 Feb 2015 16:34:48 +0000
Lines: 99
Approved: news@gmane.org
Message-ID: <CAEWLptyqSFPT9ZbFWyi_NuFC-Mos=4n2ie8CHzKg5syvuXvHuA@mail.gmail.com>
References: <ae8c1bed-7468-42ff-93f9-e7e447bb3a30@isocpp.org>
	<36478d7e-8292-424d-9544-68de55ac0566@isocpp.org>
	<54E375C0.1000407@nasa.gov>
	<a3026400-2aa9-41d6-ad73-8af89d90f424@isocpp.org>
	<54E39CB7.9000309@nasa.gov>
	<18d594d0-270f-42ad-b0c0-7765ba688dc0@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 1424363691 4511 80.91.229.3 (19 Feb 2015 16:34:51 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 19 Feb 2015 16:34:51 +0000 (UTC)
Cc: jmckesson@gmail.com, ilja.j.honkonen@nasa.gov
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDSIZVXVVUFBBKFBTCTQKGQET76IYLA@isocpp.org Thu Feb 19 17:34:50 2015
Return-path: <std-proposals+bncBDSIZVXVVUFBBKFBTCTQKGQET76IYLA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f199.google.com ([209.85.214.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDSIZVXVVUFBBKFBTCTQKGQET76IYLA@isocpp.org>)
	id 1YOU3u-0003Xa-7e
	for gclcip-std-proposals@m.gmane.org; Thu, 19 Feb 2015 17:34:50 +0100
Original-Received: by mail-ob0-f199.google.com with SMTP id nt9sf62347931obb.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 19 Feb 2015 08:34:49 -0800 (PST)
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:cc:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=pLUHpR8I9eEq7VDW9HZXzID6i2oFfBTRLHaTflmInBQ=;
        b=hSBMqQNltO3xBNitLl6neGa5j6VYLYcL1grXprSow5vLLorSoPJ6zkKKMYqjmMHnPm
         lXLVaS36K8M3zovao5m9MwldjtTwBNHKkj3fWpBuj+79ptShjflbacF2aWuj74BULhEt
         KVnu566QvyqwIcmXiNrujnjFdPleFeXPdlRFRUZ0NTNLePLB4kSf4VhcBLPMa/bcBe/T
         46O0zK7isGy2g+cO258RhjSFReDlipx1RVatcNiiRIPucktt5o8x+CFPu9RUfGRF/OIV
         f3uDpvvFi/9GZAx/FnAQRK0cUSSP0vh7WGrPFP0ykbndFzdlTmaTs+lbPk8lwz5fmCXW
         mqXA==
X-Gm-Message-State: ALoCoQkqR9qJH4LMf8C7BiapPEOiAwXUrRGKp7aJZzK5CUChdrwuWlin75kpg8V90DxAhqjtKwL0
X-Received: by 10.183.3.43 with SMTP id bt11mr5136188obd.7.1424363689297;
        Thu, 19 Feb 2015 08:34:49 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.33.1 with SMTP id i1ls773239qgi.34.gmail; Thu, 19 Feb 2015
 08:34:48 -0800 (PST)
X-Received: by 10.140.16.177 with SMTP id 46mr13119231qgb.22.1424363688581;
        Thu, 19 Feb 2015 08:34:48 -0800 (PST)
Original-Received: from mail-qg0-x22c.google.com (mail-qg0-x22c.google.com. [2607:f8b0:400d:c04::22c])
        by mx.google.com with ESMTPS id ku5si14308456qcb.23.2015.02.19.08.34.48
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 19 Feb 2015 08:34:48 -0800 (PST)
Received-SPF: pass (google.com: domain of douglas.boffey@gmail.com designates 2607:f8b0:400d:c04::22c as permitted sender) client-ip=2607:f8b0:400d:c04::22c;
Original-Received: by mail-qg0-f44.google.com with SMTP id j5so7395883qga.3
        for <std-proposals@isocpp.org>; Thu, 19 Feb 2015 08:34:48 -0800 (PST)
X-Received: by 10.140.89.111 with SMTP id u102mr13321797qgd.20.1424363688288;
 Thu, 19 Feb 2015 08:34:48 -0800 (PST)
Original-Received: by 10.140.100.135 with HTTP; Thu, 19 Feb 2015 08:34:48 -0800 (PST)
In-Reply-To: <18d594d0-270f-42ad-b0c0-7765ba688dc0@isocpp.org>
X-Original-Sender: Douglas.Boffey@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of douglas.boffey@gmail.com designates 2607:f8b0:400d:c04::22c as
 permitted sender) smtp.mail=douglas.boffey@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: <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:16407
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/16407>

Or

namespace Here::Is::A::Very::Long {
  Typename a = ...;
  Typename b = ...;
  Typename c = ...;
  // etc
}

On 2/19/15, Nicol Bolas <jmckesson@gmail.com> wrote:
>
>
> On Tuesday, February 17, 2015 at 2:55:23 PM UTC-5, Ilja Honkonen wrote:
>>
>> >     I don't know whether the ability to avoid typing the keyword double
>> >
>> was
>> >     a conscious decision (in K&R or before, after?), if it wasn't then I
>> >
>> >     agree that this probably wouldn't be worth the apparently large
>> effort,
>> >     but if it was then similar reasoning might apply here.
>> >
>> > Typenames aren't restricted to just "double". They can be long,
>> > arbitrary, and unwieldy namespace-qualified things. While "using" is
>> > always 5 characters long.
>>
>> If I understood your argument correctly the same applies to regular
>> variables: float is always 5 chars long while the value assigned to each
>> variable can come from a long, namespace-qualified, etc. function.
>>
>
> ... what?
>
> My point was that what you're saving in the variable case is itself
> *variable*. That is, it changes from case to case. The difference is this:
>
> Here::Is::A::Very::Long::Typename a = ...;
> Here::Is::A::Very::Long::Typename b = ...;
> Here::Is::A::Very::Long::Typename c = ...;
> Here::Is::A::Very::Long::Typename d = ...;
>
> vs.
>
> Here::Is::A::Very::Long::Typename
>  a = ...,
>  b = ...,
>  c = ...,
>  d = ...;
>
> In this case, you're saving a lot of keystrokes. With your "metavariable"
> case, the only thing you save is typing "using" for each variable. That's a
>
> far smaller number of keystrokes.
>
> So there's just not much of an incentive to having it in the language.
>
>
>>
>> > Also, I don't particularly agree with putting multiple variable
>> > definitions in a single statement to begin with. It's certainly terse,
>> > but it's needlessly terse. Plus, it doesn't work well with 'auto', which
>> >
>> > is what a lot of my variable definitions are using nowadays.
>>
>> Mine too and in cases where several variables are of the same type a
>> single auto shows that quickly. In the syntax I propose the same would
>> hold for template arguments given before using which might also improve
>> readability.
>>
>
> That constitutes an actual use case, as it saves more than just typing a
> keyword.
>
> You should lead with that next time.
>
> Granted, I still don't consider it a good idea. But it would actually be
> something useful.
>
> --
>
> ---
> 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/.
>

-- 

--- 
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/.

.
