220 41124 <42e51532-6c70-41da-aa2b-bc169f28cbde@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: Is C++ must need the finalizer? do you think?
Date: Wed, 28 Nov 2018 22:53:32 -0800 (PST)
Lines: 68
Approved: news@gmane.org
Message-ID: <42e51532-6c70-41da-aa2b-bc169f28cbde@isocpp.org>
References: <b4adbcd6-b84f-498b-87b4-305543009d82@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2691_281641208.1543474412910"
X-Trace: blaine.gmane.org 1543474289 4878 195.159.176.226 (29 Nov 2018 06:51:29 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 29 Nov 2018 06:51:29 +0000 (UTC)
Cc: yakitori1010@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCTJVBPG3QIBB3MZ73PQKGQEBOZG3LI@isocpp.org Thu Nov 29 07:51:25 2018
Return-path: <std-proposals+bncBCTJVBPG3QIBB3MZ73PQKGQEBOZG3LI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yb1-f198.google.com ([209.85.219.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCTJVBPG3QIBB3MZ73PQKGQEBOZG3LI@isocpp.org>)
	id 1gSGAW-0001BZ-Ly
	for gclcip-std-proposals@m.gmane.org; Thu, 29 Nov 2018 07:51:24 +0100
Original-Received: by mail-yb1-f198.google.com with SMTP id o131-v6sf612827yba.17
        for <gclcip-std-proposals@m.gmane.org>; Wed, 28 Nov 2018 22:53:35 -0800 (PST)
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:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=TFbfDfhi2TGVIfJQEehfweJQ3p5q1VYvgYi8ciWtyyg=;
        b=QjXmnDI3zwYN3AQSdorYmlAmvGA+Y51ktTxl3/woDYX9oRCiezBRR87L8RfY1ykNzv
         H9UPZ32NmFT4Hy1iDPV4JyW5wYWvEJS4RR6zfQ3/9SOpOLXGmA2ZGMGxtWx9wOjaw4Ow
         D5w2xbgogkTlUBxyc6zhSMlfuegho39BFCbWxw7jekzyzgNcWE2OmylR0puch6AfCnq6
         jrYTPJezCumQ/9jqNdmwYU8rujeVoJSPjstDa6XFOt8E0BeZpitCDHlKw4GKx5zeCIP0
         o2RUthF+AXkoDMBkoWNtx0NVl4eS6msqRKiS1WtukLaDB3Q3qFKPPaEGel4lyoEuFaz/
         0tbw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=TFbfDfhi2TGVIfJQEehfweJQ3p5q1VYvgYi8ciWtyyg=;
        b=fQU7QidbejC2qfOqoTEdBSGHp5ybkV7iMFnU/WK8JlchjDf2EC1XmACK7kK4uI5IGo
         h3+Sw4DRq9Ul8srtae+seVmwqzIpThJEslpL4SYYxYVC7hd7XySxEkqRdemyr2C49aZ6
         jt2VA386+sa6ZdD2HfRrYlcpV4C+9NamJnWRKHKDFxHj7JxM6R2TRWsFwiw7/4iGAct/
         ch9VqJA0WzYjCmEkFise9Dvr8x+PkQC92uHgpxKtyTgp01YYwF5kh1bNOC3A//ucwkkN
         mxYw+FPNjoVqs+WzXsrgaQKdtSC/oCRuD/fnPTvrOeu4tJtmqu3yCIolz7KZWTrPLNUD
         qfdw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        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=TFbfDfhi2TGVIfJQEehfweJQ3p5q1VYvgYi8ciWtyyg=;
        b=uhrKYJ8yo+akoWYe1AvzxAmWo+hviQy/caHt4fmoEJ6GM5znUyblvDWfiA0n5pZSPF
         t8NiIX6U+Pr3gBMSYuma0aWiTkKe5mlk30r5QI95oxJpwQ/qEZj3VuxsBViHorYFkqyF
         X4XmSvMpXOx7xjc3fxTH3JhxYHZ5FMRi9h1ag7zDGABueBtF6yZ+CBPVTlKg8XdZtZuS
         YR9ate/89I8nCGeHkAsnAp7NqoJ2z85eixV/Q09JcAym/f0CWFTLByiMLh2yJ4Y9DRSG
         1sNnWlJFA9cOGRUp/GcSkgqcBoQsLagkeNEoEodwrepEKV5FpJmHC4Q9uP9VGkXR5tOy
         KlyQ==
X-Gm-Message-State: AA+aEWZNDtcLb8HPpOIWJZwvwqYuRVSiH0fLj0R7OfBXxCrT55uG79qs
	lRP6ffVshQBa5cX582GrwM+vgw==
X-Google-Smtp-Source: AFSGD/XuqbSSEqTscvcZcIu9lg9EyDzn/y9+/+i6Sx/pVqEcOWXTfTFgIF0E96i1Hjap5XybDqekQg==
X-Received: by 2002:a5b:a90:: with SMTP id h16-v6mr126844ybq.62.1543474414885;
        Wed, 28 Nov 2018 22:53:34 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a81:3b0f:: with SMTP id i15ls381725ywa.7.gmail; Wed, 28 Nov
 2018 22:53:33 -0800 (PST)
X-Received: by 2002:a81:550b:: with SMTP id j11mr4351ywb.4.1543474413562;
        Wed, 28 Nov 2018 22:53:33 -0800 (PST)
In-Reply-To: <b4adbcd6-b84f-498b-87b4-305543009d82@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-Spam-Checked-In-Group: 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:41124
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41124>

------=_Part_2691_281641208.1543474412910
Content-Type: multipart/alternative; 
	boundary="----=_Part_2692_2015748289.1543474412911"

------=_Part_2692_2015748289.1543474412911
Content-Type: text/plain; charset="UTF-8"

As I understand, finalizers are destructors with relaxed requirements of 
the timing and ordering of the non-trivial effects.

In theory, yes, because finalizers can be useful when the indeterminacy are 
allowed to defer the effects (usually for some sorts of performance like 
overall throughput) and they are not expressible in the current language 
without magic.

In practice, almost no, because there is no known way to make it 
implementable without a sophisticated runtime gathering information during 
execution. And even so, there need more idioms to make users get them 
sufficient "correct" (like this 
<https://en.wikipedia.org/wiki/Unbounded_nondeterminism#Fairness>) in 
general. You will eventually get a new language for that purpose, but not 
C++.



-- 
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/42e51532-6c70-41da-aa2b-bc169f28cbde%40isocpp.org.

------=_Part_2692_2015748289.1543474412911
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">As I understand, finalizers are destructors with relaxed r=
equirements of the timing and ordering of the non-trivial effects.<br><br>I=
n theory, yes, because finalizers can be useful when the indeterminacy are =
allowed to defer the effects (usually for some sorts of performance like ov=
erall throughput) and they are not expressible in the current language with=
out magic.<br><br>In practice, almost no, because there is no known way to =
make it implementable without a sophisticated runtime gathering information=
 during execution. And even so, there need more idioms to make users get th=
em sufficient &quot;correct&quot; (like <a href=3D"https://en.wikipedia.org=
/wiki/Unbounded_nondeterminism#Fairness">this</a>) in general. You will eve=
ntually get a new language for that purpose, but not C++.<br><br><br><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/42e51532-6c70-41da-aa2b-bc169f28cbde%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/42e51532-6c70-41da-aa2b-bc169f28cbde=
%40isocpp.org</a>.<br />

------=_Part_2692_2015748289.1543474412911--

------=_Part_2691_281641208.1543474412910--

.
