220 18079 <mjj3c1$ka4$1@ger.gmane.org> article
Path: news.gmane.org!not-for-mail
From: Matthew Woehlke <mw_triad@users.sourceforge.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Parsing Numbers
Date: Wed, 20 May 2015 18:54:57 -0400
Lines: 43
Approved: news@gmane.org
Message-ID: <mjj3c1$ka4$1@ger.gmane.org>
References: <eb5c19d6-074f-4ee4-8e2d-6d92349eb4be@isocpp.org> <CANh-dXmtHpGZ8V+UsaqPfzD29kyDuD0_nB1oYby_X7JryYymhw@mail.gmail.com> <e18be2a7-50a3-4a32-bcf0-5104b91a4470@isocpp.org> <2264844.2f9Wn7Zsb9@tjmaciei-mobl4> <010af437-2f84-4afe-ae09-3e6f6edeb9b8@isocpp.org> <CAA7U3HPfmhx_GtN09T2C+NCzcWTrpGCNmHCuap+hZxW8Bj-Fzw@mail.gmail.com> <79b0dd51-6723-4ae5-b963-3763d611d8b7@isocpp.org> <555CB692.7080608@wanadoo.fr> <be484273-f893-4a6d-98e9-85303b076b77@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 1432162525 21918 80.91.229.3 (20 May 2015 22:55:25 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 20 May 2015 22:55:25 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCO5FYHBU4ERBS5B6SVAKGQE5BSD4TY@isocpp.org Thu May 21 00:55:17 2015
Return-path: <std-proposals+bncBCO5FYHBU4ERBS5B6SVAKGQE5BSD4TY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f199.google.com ([209.85.212.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCO5FYHBU4ERBS5B6SVAKGQE5BSD4TY@isocpp.org>)
	id 1YvCtL-0001ln-LM
	for gclcip-std-proposals@m.gmane.org; Thu, 21 May 2015 00:55:11 +0200
Original-Received: by wiz9 with SMTP id 9sf25016481wiz.3
        for <gclcip-std-proposals@m.gmane.org>; Wed, 20 May 2015 15:55:11 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:content-type:user-agent:in-reply-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;
        bh=UArt/V5v/ipge9ZBm2iFVc4rrqzrGn5KwCSm7cPfrSg=;
        b=V5LmnzaYUHjeYZKRzonlDUasokRqroCSZmDqbTHT9q1vyiWZJE4p/KGLQN9uPCnDAC
         +6Yf0Oer7fgYiu+WxnROVSCyYLVpDCZFbXcVuLIYSygtHLiM4EDdGEgNJxEhn85WmOt3
         9JBaex8xT7zHQehBDsQ8pdhDaaReVGL/+0tJQ7hGicxOLY0i6FKHJPiv5JDgBXZ+PA7e
         O3n/gjD7GlkL9PbMRppXqG1BoG7PEU854wUKsT1wpWyv1L12rfH+pRlYqowubHVpu8wI
         lNgxxHbi+uxvW48DhG3MZjOvh2w1fah9qd1qjJtvmA+cZGoSw7/17wt1vyQYrdLlz7Go
         Dzeg==
X-Gm-Message-State: ALoCoQlAY+A+8QAMBfng01oWmbcHf1FuU4QtIlQwmNNJPwFQ2+SiSfyhz/P5YZEK8WsfGm1RI2bV
X-Received: by 10.194.143.98 with SMTP id sd2mr28448023wjb.6.1432162511193;
        Wed, 20 May 2015 15:55:11 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.44.195 with SMTP id g3ls283282lam.0.gmail; Wed, 20 May
 2015 15:55:07 -0700 (PDT)
X-Received: by 10.112.199.35 with SMTP id jh3mr27482274lbc.23.1432162507446;
        Wed, 20 May 2015 15:55:07 -0700 (PDT)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id bf11si5086986lab.37.2015.05.20.15.55.07
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Wed, 20 May 2015 15:55:07 -0700 (PDT)
Received-SPF: pass (google.com: domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Original-Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1YvCtF-0001g9-FS
	for std-proposals@isocpp.org; Thu, 21 May 2015 00:55:05 +0200
Original-Received: from tripoint.kitware.com ([66.194.253.20])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Thu, 21 May 2015 00:55:05 +0200
Original-Received: from mw_triad by tripoint.kitware.com with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Thu, 21 May 2015 00:55:05 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 34
Original-X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: tripoint.kitware.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
In-Reply-To: <be484273-f893-4a6d-98e9-85303b076b77@isocpp.org>
X-Original-Sender: mw_triad@users.sourceforge.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as
 permitted sender) smtp.mail=gclcip-std-proposals@m.gmane.org
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:18079
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/18079>

On 2015-05-20 14:28, Matthew Fioravante wrote:
> On Wednesday, May 20, 2015 at 12:29:51 PM UTC-4, Vicente J. Botet Escriba 
> wrote:
> 
>> Not yet there, but I would find quire readable to assign multiple values 
>> and even declare them in situ as well
>>
>> {auto a, str} = parse<int>(str); 
>>
>> {auto c, ignore} = parse<int>(str);
>
> Its quite a different proposal, but I think a syntax like this is badly 
> needed.

Agreed. Unfortunately it came up before and IIRC did not get very far.

Nit: I think it would be good to allow a declaration 'void' (that is, no
name) to ignore a value. Example:

  [auto result, void] = parse<int>(str);

So, each item in the [] list is either an assignable declaration,
assignable expression, or 'void'. (I could continue, but it's off topic
for this thread.)

> Maybe not braces since current use of braces always introduce a scope and 
> that auto a lives in the outer scope. Maybe [] can be reused?
> 
> [ auto a, str ] = parse<int>(str);

Works for me, FWIW.

-- 
Matthew

-- 

--- 
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/.

.
