220 28053 <eef1301a-a5ca-4ff8-ba64-0f7ade794fd0@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: FrankHB1989 <frankhb1989@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Specifier to cause the destructor to be called at
 last use instead of end of scope
Date: Tue, 30 Aug 2016 05:38:03 -0700 (PDT)
Lines: 61
Approved: news@gmane.org
Message-ID: <eef1301a-a5ca-4ff8-ba64-0f7ade794fd0@isocpp.org>
References: <ec2e95cc-3ef0-435b-aaf9-13e982c4583e@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_45_723738256.1472560683257"
X-Trace: blaine.gmane.org 1472560699 13012 195.159.176.226 (30 Aug 2016 12:38:19 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 30 Aug 2016 12:38:19 +0000 (UTC)
Cc: nicolas.capens@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCTJVBPG3QIBBLH4SW7AKGQEC3AV2EY@isocpp.org Tue Aug 30 14:38:13 2016
Return-path: <std-proposals+bncBCTJVBPG3QIBBLH4SW7AKGQEC3AV2EY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f69.google.com ([209.85.214.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCTJVBPG3QIBBLH4SW7AKGQEC3AV2EY@isocpp.org>)
	id 1beiIp-0002Nc-T8
	for gclcip-std-proposals@m.gmane.org; Tue, 30 Aug 2016 14:38:08 +0200
Original-Received: by mail-it0-f69.google.com with SMTP id o3sf63106015ita.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 30 Aug 2016 05:38:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=3IOpfbBs44v8k53LQsZUBrNLLeSojlLlm1zyuoMQNMY=;
        b=wULqBSkaMW7uEyx6uf8tLnuxiLFAx1I7xlItucmQCLCkjH2q6fLXCJ6IglW5Ff7jnC
         dny51bDZ7LBrwEWlDtQPqMzFtnh4UL5HqvdHC+rYjAKAbQHHfw69KTtyo6axXS+aCehV
         2CIv1OvuwQqUxqiDa8LUG/+ZfbyV/XC4wevekOGYwHNXKgTSjKSdDv4hLGoGC2qIVZcO
         pgKXEV4LVLtLHL7UgQ37AU9ybAW/q0DCoP+zq/smkWttJZLEPaUtxfJIrcJCnpcVhRUD
         QJgyqnh0NZZF27JrI3IScupWU69eOmSojMfoSJZ0P5Y/b/1p+arQ9Pp7ki6Y4bAtKFxX
         u4Pg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=3IOpfbBs44v8k53LQsZUBrNLLeSojlLlm1zyuoMQNMY=;
        b=NDsXiIdIAEyU9XhuJnmmc3VQ9KGbMRaSEhGBHoTVHW6J0UkvWhsRSI6Ot6KmiNsK4D
         PoBJZMxHWgObdyiWI18ese+tRJv/dOqbgKO1iIkBc2LG7d/AHk85xVwDovvHg/SOOwzC
         d7hqjEbPj/KwhOJL9Uj++wvwRcNyONCy+UFjGXoVjyoOHDsINSN9IvFDpFoGdc3LhZ7v
         RCqafrdX4q17fZjrxExQCbDv0FPNIRHAkW/2lpVJmGjk+E7CM8S+ztKm5gWlnIuBMczS
         +3I29De7w1s6b6l0SH0n5drIZ5m6qfPUzuJqNR9kCQLvAC7nI+vlrfY25xLvlaWVVqIL
         Ov5w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=3IOpfbBs44v8k53LQsZUBrNLLeSojlLlm1zyuoMQNMY=;
        b=cWHoTqTCsX/gozJI5Vn9PJqELL+ZCq7OfWV0+MNk4aqOnZQ8msDOkLNqtetweQg/Kz
         Nu9P40+2ozvZIEOjIVgGwzkkCvfxVlKYMs2i4NhZ0nbF5OYCRQ1fHwN8bACbPiTERMQI
         QReD7yFeF2/CBiNJBcJ980ExozvPyhJalEDRfdVtvSUGJcZHk/FT8zdvOH651zzMjkQv
         GRmTCYw8uqyKT+SGESNJ32i/3aznF57oy6QZkj40cwJNhX6JLsD/zgdxRzXLPdEi5GY+
         pyAUdiVv2vSDc+CgBBLaNn51oHXTmvIUCoPk7zR1rAowO/fQctvgvuJ8QmzL6kxreSQc
         EdcA==
X-Gm-Message-State: AE9vXwMJvDF5Nmmx4qcFB+2E/KxEpj9zGX39EM9NA3N/olszhNLhzP+/yQ3f+knd1r1XyA==
X-Received: by 10.157.20.41 with SMTP id h38mr2637773oth.48.1472560688157;
        Tue, 30 Aug 2016 05:38:08 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.54.199 with SMTP id l190ls1189514itl.2.gmail; Tue, 30 Aug
 2016 05:38:04 -0700 (PDT)
X-Received: by 10.36.228.76 with SMTP id o73mr25104ith.4.1472560684156;
        Tue, 30 Aug 2016 05:38:04 -0700 (PDT)
In-Reply-To: <ec2e95cc-3ef0-435b-aaf9-13e982c4583e@isocpp.org>
X-Original-Sender: frankhb1989@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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:28053
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28053>

------=_Part_45_723738256.1472560683257
Content-Type: multipart/alternative; 
	boundary="----=_Part_46_1492685317.1472560683257"

------=_Part_46_1492685317.1472560683257
Content-Type: text/plain; charset=UTF-8

It seems that some kind of strong liveness analysis (as so-called static 
garbage collection) is need here, to infer the lifetime during translation. 
Since it can be deterministic, it may be interestingly suitable for C++. 
However, I don't like the idea of multiple "destructors"; too messy, e.g. 
so called "destructor"/finalizer/IDisposable in some current languages.

And besides the "destructor" issue, I doubt the problem is over-simplified 
too aggressively. Do you really want to create some kind of affine type 
systems rather than extends the current one? (BTW, I don't like the 
proposed syntactic notations. There may be just better a new keyword unless 
you can wrapped the features in a library form.)

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/eef1301a-a5ca-4ff8-ba64-0f7ade794fd0%40isocpp.org.

------=_Part_46_1492685317.1472560683257
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">It seems that some kind of strong liveness analysis (as so=
-called static garbage collection) is need here, to infer the lifetime duri=
ng translation. Since it can be deterministic, it may be interestingly suit=
able for C++. However, I don&#39;t like the idea of multiple &quot;destruct=
ors&quot;; too messy, e.g. so called &quot;destructor&quot;/finalizer/IDisp=
osable in some current languages.<br><br>And besides the &quot;destructor&q=
uot; issue, I doubt the problem is over-simplified too aggressively. Do you=
 really want to create some kind of affine type systems rather than extends=
 the current one? (BTW, I don&#39;t like the proposed syntactic notations. =
There may be just better a new keyword unless you can wrapped the features =
in a library form.)<br></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/eef1301a-a5ca-4ff8-ba64-0f7ade794fd0%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/eef1301a-a5ca-4ff8-ba64-0f7ade794fd0=
%40isocpp.org</a>.<br />

------=_Part_46_1492685317.1472560683257--

------=_Part_45_723738256.1472560683257--

.
