220 13640 <CAGsORuASQh5qxdcYTQnX4j6YXvDUUTErHC46LsuF_FT0BXReDQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Zhihao Yuan <zy@miator.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: 'with' revisited
Date: Fri, 3 Oct 2014 18:38:40 -0400
Lines: 107
Approved: news@gmane.org
Message-ID: <CAGsORuASQh5qxdcYTQnX4j6YXvDUUTErHC46LsuF_FT0BXReDQ@mail.gmail.com>
References: <m0n7ib$gvo$1@ger.gmane.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="089e0115f0480d3ca805048c6592"
X-Trace: ger.gmane.org 1412375936 29041 80.91.229.3 (3 Oct 2014 22:38:56 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 3 Oct 2014 22:38:56 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBB46KXSQQKGQE3B2IR3Y@isocpp.org Sat Oct 04 00:38:50 2014
Return-path: <std-proposals+bncBCSKRWMD4EHBB46KXSQQKGQE3B2IR3Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vc0-f199.google.com ([209.85.220.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBB46KXSQQKGQE3B2IR3Y@isocpp.org>)
	id 1XaBUr-0006H3-73
	for gclcip-std-proposals@m.gmane.org; Sat, 04 Oct 2014 00:38:45 +0200
Original-Received: by mail-vc0-f199.google.com with SMTP id le20sf2120510vcb.10
        for <gclcip-std-proposals@m.gmane.org>; Fri, 03 Oct 2014 15:38:44 -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:sender: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=w5sJtsHQ0rlSL2JVcdQMO+voRIvoS/pBQwgCg5xzV5g=;
        b=kKzBHYayeDvl7GD7EDnY+fO8Y1vv11Yv58a6VsyAY5c8eYCzq2YNRe/JUUjJ3108Zo
         LBZOSfzzuYknXbl59HSNf+KiUOptj6Qb/lEU2uUo9/drKb4TVfN5BFvLYVdMY9gR2u/H
         SAf90NMB9h8AkIpxUniCGIJP2Pn+T8d+cSHLK6fj3UZWWSSGpFjF9QSB+V395zInuUb3
         fNmhdaacJmviL/o+wRUNYNuPhTnDoGkTeo9hkpZYkTdjgLALImBGhJzM8728HxJtAhSt
         Kuqk0Ut/NWnr+cLCTkKHBCb54XOE+HT8+fCS3nY5aOJH55KFZz8oGendv9i3vPG8jwlU
         OiZg==
X-Gm-Message-State: ALoCoQk8eE9pmWgsofYs63qPxfLM2pK49P8kr46om89SRUMmbJEdyd3+/fEpVUGVptV26SNGF9ID
X-Received: by 10.236.24.225 with SMTP id x61mr1003996yhx.43.1412375924171;
        Fri, 03 Oct 2014 15:38:44 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.34.168 with SMTP id l37ls1408015qgl.46.gmail; Fri, 03 Oct
 2014 15:38:43 -0700 (PDT)
X-Received: by 10.220.162.73 with SMTP id u9mr3234650vcx.33.1412375923419;
        Fri, 03 Oct 2014 15:38:43 -0700 (PDT)
Original-Received: from mail-s68.mailgun.info (mail-s68.mailgun.info. [184.173.153.196])
        by mx.google.com with ESMTPS id jt10si5069038vdb.65.2014.10.03.15.38.43
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 03 Oct 2014 15:38:43 -0700 (PDT)
Received-SPF: pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) client-ip=184.173.153.196;
Original-Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com
 [209.85.220.175]) by mxa.mailgun.org with ESMTP id
 542f2571.7f74e81a3db0-in3; Fri, 03 Oct 2014 22:38:41 -0000 (UTC)
Original-Received: by mail-vc0-f175.google.com with SMTP id id10so1276320vcb.20 for
 <std-proposals@isocpp.org>; Fri, 03 Oct 2014 15:38:40 -0700 (PDT)
X-Received: by 10.52.52.136 with SMTP id t8mr5204657vdo.21.1412375920849;
 Fri, 03 Oct 2014 15:38:40 -0700 (PDT)
Original-Received: by 10.220.132.193 with HTTP; Fri, 3 Oct 2014 15:38:40 -0700 (PDT)
In-Reply-To: <m0n7ib$gvo$1@ger.gmane.org>
X-Mailgun-Sid: WyI3MTBkYiIsICJzdGQtcHJvcG9zYWxzQGlzb2NwcC5vcmciLCAiNjkxMTAiXQ==
Original-Sender: zy@miator.net
X-Original-Sender: zy@miator.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates
 184.173.153.196 as permitted sender) smtp.mail=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net;
       dkim=pass header.i=@miator.net
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:13640
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13640>

--089e0115f0480d3ca805048c6592
Content-Type: text/plain; charset=UTF-8

On Fri, Oct 3, 2014 at 6:22 PM, Matthew Woehlke <
mw_triad@users.sourceforge.net> wrote:

>
>   // Example 4
>   #define synchronized(lock) using (std::lock_guard(lock))
>

Exclude this example if you want to write a paper; the transnational
memory TS reserved this keyword.


>
> It was also requested to allow:
>
>   class Foo { ... };
>   Foo::Foo(...) using(std::lock_guard(...)
>     : ...initializers...
>   {
>     ...
>   }
>
> ...although I personally am less convinced of the need. (OTOH, I think
> this would be a use case that is not currently possible, unlike the
> others which are mainly syntatic sugar.)
>

I raised it for consistency.  I can imagine some use cases, like
opening a tempfile for initializing members, and close it after the
object is constructed.

I'm good with the `using` keyword.

-- 
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://bit.ly/blog4bsd

-- 

--- 
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/.

--089e0115f0480d3ca805048c6592
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Fri, Oct 3, 2014 at 6:22 PM, Matthew Woehlke <span dir=
=3D"ltr">&lt;<a href=3D"mailto:mw_triad@users.sourceforge.net" target=3D"_b=
lank">mw_triad@users.sourceforge.net</a>&gt;</span> wrote:<br><div class=3D=
"gmail_extra"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" =
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br=
>
=C2=A0 // Example 4<br>
=C2=A0 #define synchronized(lock) using (std::lock_guard(lock))<br></blockq=
uote><div><br></div><div>Exclude this example if you want to write a paper;=
 the transnational<br></div><div>memory TS reserved this keyword.<br></div>=
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
It was also requested to allow:<br>
<br>
=C2=A0 class Foo { ... };<br>
=C2=A0 Foo::Foo(...) using(std::lock_guard(...)<br>
=C2=A0 =C2=A0 : ...initializers...<br>
=C2=A0 {<br>
=C2=A0 =C2=A0 ...<br>
=C2=A0 }<br>
<br>
....although I personally am less convinced of the need. (OTOH, I think<br>
this would be a use case that is not currently possible, unlike the<br>
others which are mainly syntatic sugar.)<br>
<span class=3D"HOEnZb"></span></blockquote><div><br></div><div>I raised it =
for consistency.=C2=A0 I can imagine some use cases, like<br>opening a temp=
file for initializing members, and close it after the<br>object is construc=
ted.<br><br></div><div>I&#39;m good with the `using` keyword.</div><div><br=
></div></div>-- <br>Zhihao Yuan, ID lichray<br>The best way to predict the =
future is to invent it.<br>________________________________________________=
___<br>4BSD -- <a href=3D"http://bit.ly/blog4bsd" target=3D"_blank">http://=
bit.ly/blog4bsd</a>
</div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--089e0115f0480d3ca805048c6592--

.
