Topic: `pure` virt-specifier-seq to denote pure
Author: Ricardo Fabiano de Andrade <ricardofabianodeandrade@gmail.com>
Date: Mon, 11 Jul 2016 22:40:53 -0500
Raw View
--001a114f15a03d8fb5053768094f
Content-Type: text/plain; charset=UTF-8
On top of that, `pure` some may want using it with the same meaning as it
has in D:
https://dlang.org/spec/function.html#pure-functions
On Mon, Jul 11, 2016 at 9:53 PM, Greg Marr <gregmmarr@gmail.com> wrote:
> These are the parts of that thread that I think are most important:
>
> Matt Calabrese
> I do not see sufficient motivation for this change. 0 in this context is
> symbolic and pretty reasonable, in my opinion. Using "abstract" instead of
> 0 doesn't solve any practical problems ... . As far as I can tell, what you
> describe is purely just an additional syntax for something that can already
> be done in the language, and this syntax does not provide tangible benefit.
> I personally do not agree that it is more clear, either, though it
> certainly is more verbose, and I have doubts that it is at all easier to
> teach. In either way, someone has to learn that "= 0" or "= abstract" means
> that it's a pure virtual function, and I don't see why one would say that
> either one of those options is strictly better. The harder part when
> learning is understanding what a pure virtual function *is* as opposed to
> the specific spelling of "pure virtual."
> Ville Voutilainen
> Also, adding a second syntax to do the exact same thing as another syntax
> increases the knowledge needed for code readers to understand 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/69414d97-dbaf-4ba4-b8fa-17bc5279b402%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/69414d97-dbaf-4ba4-b8fa-17bc5279b402%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>
--
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/CA%2BfGSbM68B1AfOjtJfham7ZcWX5S6GKxxvNn9HvK%2BhJ9wNuBuQ%40mail.gmail.com.
--001a114f15a03d8fb5053768094f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On top of that, `pure` some may want using it with the sam=
e meaning as it has in D:<div><a href=3D"https://dlang.org/spec/function.ht=
ml#pure-functions">https://dlang.org/spec/function.html#pure-functions</a><=
br></div><div><br></div></div><div class=3D"gmail_extra"><br><div class=3D"=
gmail_quote">On Mon, Jul 11, 2016 at 9:53 PM, Greg Marr <span dir=3D"ltr">&=
lt;<a href=3D"mailto:gregmmarr@gmail.com" target=3D"_blank">gregmmarr@gmail=
..com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"lt=
r">These are the parts of that thread that I think are most important:=C2=
=A0<div><br></div><div><div><div><div style=3D"overflow:auto"><div style=3D=
"max-height:10000px"><div dir=3D"ltr"><div class=3D"gmail_quote"><span styl=
e=3D"color:rgb(136,136,136);line-height:19.5px"><span style=3D"color:rgb(34=
,34,34)">Matt Calabrese</span></span><span style=3D"color:rgb(136,136,136);=
line-height:19.5px">=C2=A0</span><br>I do not see sufficient motivation for=
this change. 0 in this context is symbolic and pretty reasonable, in my op=
inion. Using "abstract" instead of 0 doesn't solve any practi=
cal problems ... . As far as I can tell, what you describe is purely just a=
n additional syntax for something that can already be done in the language,=
and this syntax does not provide tangible benefit. I personally do not agr=
ee that it is more clear, either, though it certainly is more verbose, and =
I have doubts that it is at all easier to teach. In either way, someone has=
to learn that "=3D 0" or "=3D abstract" means that it&=
#39;s a pure virtual function, and I don't see why one would say that e=
ither one of those options is strictly better. The harder part when learnin=
g is understanding what a pure virtual function *is* as opposed to the spec=
ific spelling of "pure virtual."</div></div></div></div></div><di=
v></div><div></div></div><div><div></div></div><div><div></div><div><span s=
tyle=3D"font-weight:bold;line-height:19.5px;white-space:nowrap">Ville Vouti=
lainen</span><br></div><div>Also, adding a second syntax to do the exact sa=
me thing as another syntax increases the knowledge needed for code readers =
to understand C++.<span class=3D"HOEnZb"><font color=3D"#888888"><br clear=
=3D"all"></font></span></div><span class=3D"HOEnZb"><font color=3D"#888888"=
><div><br></div><div><br></div></font></span></div></div></div><span class=
=3D"HOEnZb"><font color=3D"#888888">
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/69414d97-dbaf-4ba4-b8fa-17bc5279b402%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/69414d97-dbaf-=
4ba4-b8fa-17bc5279b402%40isocpp.org</a>.<br>
</font></span></blockquote></div><br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/CA%2BfGSbM68B1AfOjtJfham7ZcWX5S6GKxxv=
Nn9HvK%2BhJ9wNuBuQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CA%2BfGSbM68B=
1AfOjtJfham7ZcWX5S6GKxxvNn9HvK%2BhJ9wNuBuQ%40mail.gmail.com</a>.<br />
--001a114f15a03d8fb5053768094f--
.
Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 12 Jul 2016 12:20:31 -0400
Raw View
--001a1146a0eae6c157053772a5c9
Content-Type: text/plain; charset=UTF-8
On Mon, Jul 11, 2016 at 11:40 PM, Ricardo Fabiano de Andrade <
ricardofabianodeandrade@gmail.com> wrote:
> On top of that, `pure` some may want using it with the same meaning as it
> has in D:
> https://dlang.org/spec/function.html#pure-functions
>
>
Definitely.
--
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/CAOHCbit6Vu%3Dich3JRZj_xcJsRUkh%3DSbo9JnTe9QAQ1idRCOepg%40mail.gmail.com.
--001a1146a0eae6c157053772a5c9
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Mon, Jul 11, 2016 at 11:40 PM, Ricardo Fabiano de Andrade <span dir=
=3D"ltr"><<a href=3D"mailto:ricardofabianodeandrade@gmail.com" target=3D=
"_blank">ricardofabianodeandrade@gmail.com</a>></span> wrote:<br><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div dir=3D"ltr">On top of that, `pure` some may wa=
nt using it with the same meaning as it has in D:<div><a href=3D"https://dl=
ang.org/spec/function.html#pure-functions" target=3D"_blank">https://dlang.=
org/spec/function.html#pure-functions</a><br></div><div><br></div></div></b=
lockquote><div><br></div><div>Definitely.<br></div></div><br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/CAOHCbit6Vu%3Dich3JRZj_xcJsRUkh%3DSbo=
9JnTe9QAQ1idRCOepg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOHCbit6Vu%3=
Dich3JRZj_xcJsRUkh%3DSbo9JnTe9QAQ1idRCOepg%40mail.gmail.com</a>.<br />
--001a1146a0eae6c157053772a5c9--
.
Author: ezmagician@gmail.com
Date: Tue, 12 Jul 2016 13:51:47 -0700 (PDT)
Raw View
------=_Part_1489_233786482.1468356708096
Content-Type: multipart/alternative;
boundary="----=_Part_1490_2083525293.1468356708096"
------=_Part_1490_2083525293.1468356708096
Content-Type: text/plain; charset=UTF-8
I was not aware of its use in other languages. I agree that `abstract` may
be the better choice (Java uses it as well).
On Monday, July 11, 2016 at 11:40:56 PM UTC-4, Ricardo Andrade wrote:
>
> On top of that, `pure` some may want using it with the same meaning as it
> has in D:
> https://dlang.org/spec/function.html#pure-functions
>
>
> On Mon, Jul 11, 2016 at 9:53 PM, Greg Marr <greg...@gmail.com
> <javascript:>> wrote:
>
>> These are the parts of that thread that I think are most important:
>>
>> Matt Calabrese
>> I do not see sufficient motivation for this change. 0 in this context is
>> symbolic and pretty reasonable, in my opinion. Using "abstract" instead of
>> 0 doesn't solve any practical problems ... . As far as I can tell, what you
>> describe is purely just an additional syntax for something that can already
>> be done in the language, and this syntax does not provide tangible benefit.
>> I personally do not agree that it is more clear, either, though it
>> certainly is more verbose, and I have doubts that it is at all easier to
>> teach. In either way, someone has to learn that "= 0" or "= abstract" means
>> that it's a pure virtual function, and I don't see why one would say that
>> either one of those options is strictly better. The harder part when
>> learning is understanding what a pure virtual function *is* as opposed to
>> the specific spelling of "pure virtual."
>> Ville Voutilainen
>> Also, adding a second syntax to do the exact same thing as another syntax
>> increases the knowledge needed for code readers to understand 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-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/69414d97-dbaf-4ba4-b8fa-17bc5279b402%40isocpp.org
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/69414d97-dbaf-4ba4-b8fa-17bc5279b402%40isocpp.org?utm_medium=email&utm_source=footer>
>> .
>>
>
>
--
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/931b1ea3-1807-4f0c-a8a5-780cd8815ff0%40isocpp.org.
------=_Part_1490_2083525293.1468356708096
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>I was not aware of its use in other languages. I agre=
e that `abstract` may be the better choice (Java uses it as well).</div><di=
v><br>On Monday, July 11, 2016 at 11:40:56 PM UTC-4, Ricardo Andrade wrote:=
<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bor=
der-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">On top of tha=
t, `pure` some may want using it with the same meaning as it has in D:<div>=
<a href=3D"https://dlang.org/spec/function.html#pure-functions" target=3D"_=
blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'https://www.google.=
com/url?q\x3dhttps%3A%2F%2Fdlang.org%2Fspec%2Ffunction.html%23pure-function=
s\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFm_tw93kPe_9jwRVFHAHvZ1xe6xw'=
;return true;" onclick=3D"this.href=3D'https://www.google.com/url?q\x3d=
https%3A%2F%2Fdlang.org%2Fspec%2Ffunction.html%23pure-functions\x26sa\x3dD\=
x26sntz\x3d1\x26usg\x3dAFQjCNFm_tw93kPe_9jwRVFHAHvZ1xe6xw';return true;=
">https://dlang.org/spec/<wbr>function.html#pure-functions</a><br></div><di=
v><br></div></div><div><br><div class=3D"gmail_quote">On Mon, Jul 11, 2016 =
at 9:53 PM, Greg Marr <span dir=3D"ltr"><<a href=3D"javascript:" target=
=3D"_blank" gdf-obfuscated-mailto=3D"-0Dmt1OICgAJ" rel=3D"nofollow" onmouse=
down=3D"this.href=3D'javascript:';return true;" onclick=3D"this.hre=
f=3D'javascript:';return true;">greg...@gmail.com</a>></span> wr=
ote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">These are the parts=
of that thread that I think are most important:=C2=A0<div><br></div><div><=
div><div><div style=3D"overflow:auto"><div style=3D"max-height:10000px"><di=
v dir=3D"ltr"><div class=3D"gmail_quote"><span style=3D"color:rgb(136,136,1=
36);line-height:19.5px"><span style=3D"color:rgb(34,34,34)">Matt Calabrese<=
/span></span><span style=3D"color:rgb(136,136,136);line-height:19.5px">=C2=
=A0</span><br>I do not see sufficient motivation for this change. 0 in this=
context is symbolic and pretty reasonable, in my opinion. Using "abst=
ract" instead of 0 doesn't solve any practical problems ... . As f=
ar as I can tell, what you describe is purely just an additional syntax for=
something that can already be done in the language, and this syntax does n=
ot provide tangible benefit. I personally do not agree that it is more clea=
r, either, though it certainly is more verbose, and I have doubts that it i=
s at all easier to teach. In either way, someone has to learn that "=
=3D 0" or "=3D abstract" means that it's a pure virtual =
function, and I don't see why one would say that either one of those op=
tions is strictly better. The harder part when learning is understanding wh=
at a pure virtual function *is* as opposed to the specific spelling of &quo=
t;pure virtual."</div></div></div></div></div><div></div><div></div></=
div><div><div></div></div><div><div></div><div><span style=3D"font-weight:b=
old;line-height:19.5px;white-space:nowrap">Ville Voutilainen</span><br></di=
v><div>Also, adding a second syntax to do the exact same thing as another s=
yntax increases the knowledge needed for code readers to understand C++.<sp=
an><font color=3D"#888888"><br clear=3D"all"></font></span></div><span><fon=
t color=3D"#888888"><div><br></div><div><br></div></font></span></div></div=
></div><span><font color=3D"#888888">
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
-0Dmt1OICgAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D'javascript:&=
#39;;return true;" onclick=3D"this.href=3D'javascript:';return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"-0Dmt1OICgAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D'javascript:';return true;" onclick=3D"this.href=3D'=
;javascript:';return true;">std-pr...@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/69414d97-dbaf-4ba4-b8fa-17bc5279b402%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D'https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/69414d97-dbaf-4ba4-b8fa-17bc5279b402%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" on=
click=3D"this.href=3D'https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/69414d97-dbaf-4ba4-b8fa-17bc5279b402%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter';return true;">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/69414d97-dbaf-4ba4-<wbr>b8fa-=
17bc5279b402%40isocpp.org</a><wbr>.<br>
</font></span></blockquote></div><br></div>
</blockquote></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/931b1ea3-1807-4f0c-a8a5-780cd8815ff0%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/931b1ea3-1807-4f0c-a8a5-780cd8815ff0=
%40isocpp.org</a>.<br />
------=_Part_1490_2083525293.1468356708096--
------=_Part_1489_233786482.1468356708096--
.
Author: "D. B." <db0451@gmail.com>
Date: Tue, 12 Jul 2016 21:58:05 +0100
Raw View
--001a114b14e08bc07b053776867d
Content-Type: text/plain; charset=UTF-8
On Tue, Jul 12, 2016 at 5:20 PM, Tony V E <tvaneerd@gmail.com> wrote:
>
>
> On Mon, Jul 11, 2016 at 11:40 PM, Ricardo Fabiano de Andrade <
> ricardofabianodeandrade@gmail.com> wrote:
>
>> On top of that, `pure` some may want using it with the same meaning as it
>> has in D:
>> https://dlang.org/spec/function.html#pure-functions
>>
>>
> Definitely.
>
*Why?* C++ and D are unrelated. Why should C++ start doing things just
because some other language does?
Yeah, the original syntax is daft, and Bjarne knows that well - but it's
what we've got, and I don't see why it matters enough to add a new
specifier and 2 ways of doing the same thing (because there's no way "= 0"
can be removed), *especially* not when the apparent rationale is to attain
a single disjointed piece of parity with unrelated languages.
--
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/CACGiwhFuyRE1gnrBHmfSmFtt2Z5zyfvxNNtkRerkAu54X8NCOA%40mail.gmail.com.
--001a114b14e08bc07b053776867d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On Tue, Jul 12, 2016 at 5:20 PM, Tony V E <span dir=3D"ltr"><<a href=3D"=
mailto:tvaneerd@gmail.com" target=3D"_blank">tvaneerd@gmail.com</a>></sp=
an> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><div clas=
s=3D"gmail_extra"><br><div class=3D"gmail_quote"><span class=3D"">On Mon, J=
ul 11, 2016 at 11:40 PM, Ricardo Fabiano de Andrade <span dir=3D"ltr"><<=
a href=3D"mailto:ricardofabianodeandrade@gmail.com" target=3D"_blank">ricar=
dofabianodeandrade@gmail.com</a>></span> wrote:<br><blockquote class=3D"=
gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-=
left:1ex"><div dir=3D"ltr">On top of that, `pure` some may want using it wi=
th the same meaning as it has in D:<div><a href=3D"https://dlang.org/spec/f=
unction.html#pure-functions" target=3D"_blank">https://dlang.org/spec/funct=
ion.html#pure-functions</a><br></div><div><br></div></div></blockquote><div=
><br></div></span><div>Definitely.<br></div></div></div></div></blockquote>=
<div><br></div><div><i>Why?</i> C++ and D are unrelated. Why should C++ sta=
rt doing things just because some other language does?<br><br></div><div>Ye=
ah, the original syntax is daft, and Bjarne knows that well - but it's =
what we've got, and I don't see why it matters enough to add a new =
specifier and 2 ways of doing the same thing (because there's no way &q=
uot;=3D 0" can be removed), <i>especially</i> not when the apparent ra=
tionale is to attain a single disjointed piece of parity with unrelated lan=
guages.<br><br></div></div><br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/CACGiwhFuyRE1gnrBHmfSmFtt2Z5zyfvxNNtk=
RerkAu54X8NCOA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhFuyRE1gnrB=
HmfSmFtt2Z5zyfvxNNtkRerkAu54X8NCOA%40mail.gmail.com</a>.<br />
--001a114b14e08bc07b053776867d--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Wed, 13 Jul 2016 00:03:57 +0300
Raw View
On 12 July 2016 at 23:58, D. B. <db0451@gmail.com> wrote:
>
> On Tue, Jul 12, 2016 at 5:20 PM, Tony V E <tvaneerd@gmail.com> wrote:
>>
>>
>>
>> On Mon, Jul 11, 2016 at 11:40 PM, Ricardo Fabiano de Andrade
>> <ricardofabianodeandrade@gmail.com> wrote:
>>>
>>> On top of that, `pure` some may want using it with the same meaning as it
>>> has in D:
>>> https://dlang.org/spec/function.html#pure-functions
>>>
>>
>> Definitely.
>
>
> Why? C++ and D are unrelated. Why should C++ start doing things just because
> some other language does?
That's not why C++ would support pure functions. See for example
https://cplusplus.github.io/EWG/ewg-active.html#75
and the existing vendor-specific attributes for marking functions pure.
--
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/CAFk2RUYzNJq%2B2jB0SDGTVFT0jfs7eajOFe7fbvA7hmvi9%2Bun1Q%40mail.gmail.com.
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Tue, 12 Jul 2016 14:23:15 -0700
Raw View
Em ter=C3=A7a-feira, 12 de julho de 2016, =C3=A0s 14:03:07 PDT, ezmagician@=
gmail.com=20
escreveu:
> - It would allow for writing definitions for pure virtual functions=20
> without being required to define them outside the class declaration in=
a=20
> consistent manner with other C++ code.
How?
You can't write a body for a defaulted or deleted function, so how does the=
=20
syntax for default/delete allow for that when expanded to include the=20
"abstract" keyword?
If we're going to change the syntax anyway, why wouldn't we allow writing a=
=20
body after "=3D 0" ?
--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--=20
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 e=
mail 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/1709320.6Ex6ASaInd%40tjmaciei-mobl1.
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Tue, 12 Jul 2016 14:31:56 -0700 (PDT)
Raw View
------=_Part_1312_157796856.1468359116394
Content-Type: multipart/alternative;
boundary="----=_Part_1313_96156815.1468359116394"
------=_Part_1313_96156815.1468359116394
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Tuesday, July 12, 2016 at 5:23:20 PM UTC-4, Thiago Macieira wrote:
>
> Em ter=C3=A7a-feira, 12 de julho de 2016, =C3=A0s 14:03:07 PDT, ezmag...@=
gmail.com=20
> <javascript:>=20
> escreveu:=20
> > - It would allow for writing definitions for pure virtual functions=
=20
> > without being required to define them outside the class declaration=
=20
> in a=20
> > consistent manner with other C++ code.=20
>
> How?=20
>
> You can't write a body for a defaulted or deleted function, so how does=
=20
> the=20
> syntax for default/delete allow for that when expanded to include the=20
> "abstract" keyword?
>
Because it doesn't use `=3D`.
The idea is not to change `=3D 0` to `=3D abstract`. The idea is to define =
the=20
use of a special identifier that would mean that the function is pure=20
virtual. But you can give it whatever semantics you want on top of that,=20
even if they are different from `=3D 0`.
Now granted, I don't think it's worth the change just for that. But I think=
=20
that is the general idea.
--=20
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 e=
mail 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/c3c923e5-52fa-4e67-aea8-8b00459d7b9f%40isocpp.or=
g.
------=_Part_1313_96156815.1468359116394
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Tuesday, July 12, 2016 at 5:23:20 PM UTC-4, Thi=
ago Macieira wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Em ter=C3=
=A7a-feira, 12 de julho de 2016, =C3=A0s 14:03:07 PDT, <a href=3D"javascrip=
t:" target=3D"_blank" gdf-obfuscated-mailto=3D"iWMRYU3CCgAJ" rel=3D"nofollo=
w" onmousedown=3D"this.href=3D'javascript:';return true;" onclick=
=3D"this.href=3D'javascript:';return true;">ezmag...@gmail.com</a>=
=20
<br>escreveu:
<br>> =C2=A0 =C2=A0- It would allow for writing definitions for pure vir=
tual functions=20
<br>> =C2=A0 =C2=A0without being required to define them outside the cla=
ss declaration in a=20
<br>> consistent manner with other C++ code.
<br>
<br>How?
<br>
<br>You can't write a body for a defaulted or deleted function, so how =
does the=20
<br>syntax for default/delete allow for that when expanded to include the=
=20
<br>"abstract" keyword?<br></blockquote><div><br>Because it doesn=
't use `=3D`.<br><br>The idea is not to change `=3D 0` to `=3D abstract=
`. The idea is to define the use of a special identifier that would mean th=
at the function is pure virtual. But you can give it whatever semantics you=
want on top of that, even if they are different from `=3D 0`.<br><br>Now g=
ranted, I don't think it's worth the change just for that. But I th=
ink that is the general idea.<br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/c3c923e5-52fa-4e67-aea8-8b00459d7b9f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c3c923e5-52fa-4e67-aea8-8b00459d7b9f=
%40isocpp.org</a>.<br />
------=_Part_1313_96156815.1468359116394--
------=_Part_1312_157796856.1468359116394--
.
Author: Andrey Semashev <andrey.semashev@gmail.com>
Date: Wed, 13 Jul 2016 00:37:10 +0300
Raw View
On 07/13/16 00:31, Nicol Bolas wrote:
> On Tuesday, July 12, 2016 at 5:23:20 PM UTC-4, Thiago Macieira wrote:
>
> You can't write a body for a defaulted or deleted function, so how
> does the
> syntax for default/delete allow for that when expanded to include the
> "abstract" keyword?
>
> Because it doesn't use `=`.
Why is it a problem to allow the function body after "="?
--
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/57856306.6020906%40gmail.com.
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Tue, 12 Jul 2016 15:16:39 -0700 (PDT)
Raw View
------=_Part_1163_1746322439.1468361799398
Content-Type: multipart/alternative;
boundary="----=_Part_1164_2102580864.1468361799398"
------=_Part_1164_2102580864.1468361799398
Content-Type: text/plain; charset=UTF-8
On Tuesday, July 12, 2016 at 5:37:13 PM UTC-4, Andrey Semashev wrote:
>
> On 07/13/16 00:31, Nicol Bolas wrote:
> > On Tuesday, July 12, 2016 at 5:23:20 PM UTC-4, Thiago Macieira wrote:
> >
> > You can't write a body for a defaulted or deleted function, so how
> > does the
> > syntax for default/delete allow for that when expanded to include
> the
> > "abstract" keyword?
> >
> > Because it doesn't use `=`.
>
> Why is it a problem to allow the function body after "="?
>
Besides the fact that the syntax currently forbids it?
Nothing.
Yes, you could change the syntax to allow a function definition to follow
the `pure-specifier`.
--
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/7cd8777d-983f-480e-bb27-de455d59ec06%40isocpp.org.
------=_Part_1164_2102580864.1468361799398
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Tuesday, July 12, 2016 at 5:37:13 PM UTC-4, Andrey Sema=
shev wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 07/13/16 00:31, =
Nicol Bolas wrote:
<br>> On Tuesday, July 12, 2016 at 5:23:20 PM UTC-4, Thiago Macieira wro=
te:
<br>>
<br>> =C2=A0 =C2=A0 You can't write a body for a defaulted or delete=
d function, so how
<br>> =C2=A0 =C2=A0 does the
<br>> =C2=A0 =C2=A0 syntax for default/delete allow for that when expand=
ed to include the
<br>> =C2=A0 =C2=A0 "abstract" keyword?
<br>>
<br>> Because it doesn't use `=3D`.
<br>
<br>Why is it a problem to allow the function body after "=3D"?<b=
r></blockquote><div><br>Besides the fact that the syntax currently forbids =
it?<br><br>Nothing.<br><br>Yes, you could change the syntax to allow a func=
tion definition to follow the `pure-specifier`.<br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/7cd8777d-983f-480e-bb27-de455d59ec06%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7cd8777d-983f-480e-bb27-de455d59ec06=
%40isocpp.org</a>.<br />
------=_Part_1164_2102580864.1468361799398--
------=_Part_1163_1746322439.1468361799398--
.
Author: Magnus Fromreide <magfr@lysator.liu.se>
Date: Wed, 13 Jul 2016 00:29:17 +0200
Raw View
On Tue, Jul 12, 2016 at 02:23:15PM -0700, Thiago Macieira wrote:
> Em ter=C3=A7a-feira, 12 de julho de 2016, =C3=A0s 14:03:07 PDT, ezmagicia=
n@gmail.com=20
> escreveu:
> > - It would allow for writing definitions for pure virtual functions=
=20
> > without being required to define them outside the class declaration =
in a=20
> > consistent manner with other C++ code.
>=20
> How?
>=20
> You can't write a body for a defaulted or deleted function, so how does t=
he=20
> syntax for default/delete allow for that when expanded to include the=20
> "abstract" keyword?
As far as I understand the proposal the idea is to be able to write
struct x {
virtual ~x() abstract =3D default;
};
rather than
struct x {
virtual ~x() =3D 0;
};
inline x::~x() =3D default;
> If we're going to change the syntax anyway, why wouldn't we allow writing=
a=20
> body after "=3D 0" ?
I agree that it is a good idea but I think it is unrelated to the proposal =
at
hand which seems to be more about defaulted functions than anything else.
/MF
--=20
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 e=
mail 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/20160712222916.GA32041%40noemi.
.
Author: ezmagician@gmail.com
Date: Tue, 12 Jul 2016 15:43:04 -0700 (PDT)
Raw View
------=_Part_877_650758439.1468363384319
Content-Type: multipart/alternative;
boundary="----=_Part_878_1176861242.1468363384319"
------=_Part_878_1176861242.1468363384319
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Magnus is correct.
>
You can't write a body for a defaulted or deleted function, so how does the=
=20
> syntax for default/delete allow for that when expanded to include the=20
> "abstract" keyword?=20
The reasoning I gave in my first response post was that `=3D 0` is *not* li=
ke=20
default or delete in that it does not provide a definition.
The `Foo() =3D ...` syntax for default and delete is used with respect to t=
he=20
function's definition, but `=3D 0` does not follow that pattern.
`=3D 0` only specifies that the function is pure virtual. It does not provi=
de=20
a definition like `=3D default` or `=3D delete`.
This is why I suggested that the "pure" specifier (`abstract` in this case)=
=20
be used in the context of virt-specifiers like override and final.
This proposal shouldn't change how default and delete work. They are=20
unrelated.
Why is it a problem to allow the function body after "=3D"?=20
*Inconsistency*. The only situations where `=3D` is used after a function=
=20
declaration is to mark a virtual function pure, and in the case of default=
=20
and delete.
None of these three allow for a definition to be written after the `=3D`=20
syntax (rightfully so for default and delete, arguably so for =3D 0).
However, there is nothing inconsistent with the `void foo() abstract { ...=
=20
}` syntax because it is allowed for override and final already.
Does this not break the pattern?
struct Foo() {
Foo() =3D default; // OK, no definition allowed after =3D.
Foo(Foo const&) =3D delete; // OK, no definition allowed after =3D
void bar() =3D abstract { ... } // Why for abstract?
}
Is this not more consistent?
struct Foo() {
virtual void x() abstract;
virtual void y() abstract;
virtual void z() abstract;
}
struct Bar() {
virtual void x() override { ... } // OK
virtual void y() override final { ... } // OK
virtual void z() override pure { ... } // OK
}
On Tuesday, July 12, 2016 at 6:29:20 PM UTC-4, Magnus Fromreide wrote:
>
> On Tue, Jul 12, 2016 at 02:23:15PM -0700, Thiago Macieira wrote:=20
> > Em ter=C3=A7a-feira, 12 de julho de 2016, =C3=A0s 14:03:07 PDT, ezmag..=
..@gmail.com=20
> <javascript:>=20
> > escreveu:=20
> > > - It would allow for writing definitions for pure virtual function=
s=20
> > > without being required to define them outside the class declaratio=
n=20
> in a=20
> > > consistent manner with other C++ code.=20
> >=20
> > How?=20
> >=20
> > You can't write a body for a defaulted or deleted function, so how does=
=20
> the=20
> > syntax for default/delete allow for that when expanded to include the=
=20
> > "abstract" keyword?=20
>
> As far as I understand the proposal the idea is to be able to write=20
>
> struct x {=20
> virtual ~x() abstract =3D default;=20
> };=20
>
> rather than=20
>
> struct x {=20
> virtual ~x() =3D 0;=20
> };=20
>
> inline x::~x() =3D default;=20
>
> > If we're going to change the syntax anyway, why wouldn't we allow=20
> writing a=20
> > body after "=3D 0" ?=20
>
> I agree that it is a good idea but I think it is unrelated to the proposa=
l=20
> at=20
> hand which seems to be more about defaulted functions than anything else.=
=20
>
> /MF=20
>
--=20
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 e=
mail 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/70899f87-7f91-47ef-8f14-50b4ae29407b%40isocpp.or=
g.
------=_Part_878_1176861242.1468363384319
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Magnus is correct.</div><blockquote class=3D"gmail_qu=
ote" style=3D"border-left-width: 1px; border-left-style: solid; border-left=
-color: rgb(204, 204, 204); padding-left: 1ex;"></blockquote><div><br></div=
><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; bord=
er-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 2=
04, 204); padding-left: 1ex;">You can't write a body for a defaulted or=
deleted function, so how does the=C2=A0<br>syntax for default/delete allow=
for that when expanded to include the=C2=A0<br>"abstract" keywor=
d?=C2=A0</blockquote><div><div><br></div><div>The reasoning I gave in my fi=
rst response post was that `=3D 0` is=C2=A0<i>not</i>=C2=A0like default or =
delete in that it does not provide a definition.</div><div>The `Foo() =3D .=
...` syntax for default and delete is used with respect to the function'=
s definition, but `=3D 0` does not follow that pattern.</div><div>`=3D 0` o=
nly specifies that the function is pure virtual. It does not provide a defi=
nition like `=3D default` or `=3D delete`.</div><div>This is why I suggeste=
d that the "pure" specifier (`abstract` in this case) be used in =
the context of virt-specifiers like override and final.</div><div>This prop=
osal shouldn't change how default and delete work. They are unrelated.<=
/div><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0px =
0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-lef=
t-color: rgb(204, 204, 204); padding-left: 1ex;">Why is it a problem to all=
ow the function body after "=3D"?=C2=A0</blockquote><div><br></di=
v><div><b>Inconsistency</b>. The only situations where `=3D` is used after =
a function declaration is to mark a virtual function pure, and in the case =
of default and delete.</div><div>None of these three allow for a definition=
to be written after the `=3D` syntax (rightfully so for default and delete=
, arguably so for =3D 0).</div><div>However, there is nothing inconsistent =
with the `void foo() abstract { ... }` syntax because it is allowed for ove=
rride and final already.</div><div><br></div><div>Does this not break the p=
attern?</div><div><br></div><div><div class=3D"prettyprint" style=3D"border=
: 1px solid rgb(187, 187, 187); word-wrap: break-word; background-color: rg=
b(250, 250, 250);"><code class=3D"prettyprint"><div class=3D"subprettyprint=
"><span style=3D"color: #008;" class=3D"styled-by-prettify">struct</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">Foo</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"><br>=C2=A0 </span><span style=3D"color: #606;" class=3D"styl=
ed-by-prettify">Foo</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">()</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">default</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0</span><span style=3D"color: #800;" class=3D"styled-by-prettif=
y">// OK, no definition allowed after =3D.</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">Foo</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">(</span><span style=3D"color: #606;" class=3D"sty=
led-by-prettify">Foo</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>const</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
;)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">delete</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> =C2=A0 =C2=A0 </span><font color=3D"#666600">=
<span style=3D"color: #800;" class=3D"styled-by-prettify">// OK, no definit=
ion allowed after =3D</span></font><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"><br>=C2=A0 </span><font color=3D"#660066"><span style=3D"=
color: #008;" class=3D"styled-by-prettify">void</span><span style=3D"color:=
#000;" class=3D"styled-by-prettify"> bar</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">()</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">a=
bstract</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">...</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">}</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #800;" class=3D"style=
d-by-prettify">// Why for abstract?</span></font><span style=3D"color: #000=
;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">}</span></div></code></div><br>Is this not more c=
onsistent?</div><div><br></div><div><div class=3D"prettyprint" style=3D"bor=
der: 1px solid rgb(187, 187, 187); word-wrap: break-word; background-color:=
rgb(250, 250, 250);"><code class=3D"prettyprint"><div class=3D"subprettypr=
int"><span style=3D"color: #008;" class=3D"styled-by-prettify">struct</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #606;" class=3D"styled-by-prettify">Foo</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">virtual</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">void</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
x</span><span style=3D"color: #660;" class=3D"styled-by-prettify">()</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">abstract</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">virtual</span><span style=3D"color:=
#000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">void</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> y</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">()</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">a=
bstract</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 <=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">virtual</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #008;" class=3D"styled-by-prettify">void</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> z</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">abstract</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"><br></span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">}</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
<br><br></span><span style=3D"color: #008;" class=3D"styled-by-prettify">st=
ruct</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #606;" class=3D"styled-by-prettify">Bar</span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">()</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"><br>=C2=A0 </span><span style=3D"color: #008;"=
class=3D"styled-by-prettify">virtual</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">void</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> x</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">()</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">override</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0 =
=C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">...</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #800;" class=3D"=
styled-by-prettify">// OK</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"><br>=C2=A0 </span><span style=3D"color: #008;" class=3D"styl=
ed-by-prettify">virtual</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">void</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> y=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">()</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><font colo=
r=3D"#000088"><span style=3D"color: #008;" class=3D"styled-by-prettify">ove=
rride</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an><span style=3D"color: #008;" class=3D"styled-by-prettify">final</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">...</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">}</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #800;" class=3D"styled-by-prettify">// =
OK</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></sp=
an></font><span style=3D"color: #000;" class=3D"styled-by-prettify">=C2=A0 =
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">virtual</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
style=3D"color: #008;" class=3D"styled-by-prettify">void</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> z</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">override</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> pure =C2=A0</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">...</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #800;" class=3D"styled-by-prettify">// OK</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">}</span></div></code></div></div><br>=
On Tuesday, July 12, 2016 at 6:29:20 PM UTC-4, Magnus Fromreide wrote:<bloc=
kquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-l=
eft: 1px #ccc solid;padding-left: 1ex;">On Tue, Jul 12, 2016 at 02:23:15PM =
-0700, Thiago Macieira wrote:
<br>> Em ter=C3=A7a-feira, 12 de julho de 2016, =C3=A0s 14:03:07 PDT, <a=
href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"qucpZefFCg=
AJ" rel=3D"nofollow" onmousedown=3D"this.href=3D'javascript:';retur=
n true;" onclick=3D"this.href=3D'javascript:';return true;">ezmag..=
..@gmail.com</a>=20
<br>> escreveu:
<br>> > =C2=A0 =C2=A0- It would allow for writing definitions for pur=
e virtual functions=20
<br>> > =C2=A0 =C2=A0without being required to define them outside th=
e class declaration in a=20
<br>> > consistent manner with other C++ code.
<br>>=20
<br>> How?
<br>>=20
<br>> You can't write a body for a defaulted or deleted function, so=
how does the=20
<br>> syntax for default/delete allow for that when expanded to include =
the=20
<br>> "abstract" keyword?
<br>
<br>As far as I understand the proposal the idea is to be able to write
<br>
<br>struct x {
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0virtual ~x() abstract =
=3D default;
<br>};
<br>
<br>rather than
<br>
<br>struct x {
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0virtual ~x() =3D 0;
<br>};
<br>
<br>inline x::~x() =3D default;
<br>
<br>> If we're going to change the syntax anyway, why wouldn't w=
e allow writing a=20
<br>> body after "=3D 0" ?
<br>
<br>I agree that it is a good idea but I think it is unrelated to the propo=
sal at
<br>hand which seems to be more about defaulted functions than anything els=
e.
<br>
<br>/MF
<br></blockquote></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/70899f87-7f91-47ef-8f14-50b4ae29407b%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/70899f87-7f91-47ef-8f14-50b4ae29407b=
%40isocpp.org</a>.<br />
------=_Part_878_1176861242.1468363384319--
------=_Part_877_650758439.1468363384319--
.
Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 12 Jul 2016 18:44:58 -0400
Raw View
So I guess we could allow:
struct x {
virtual ~x() =C2=A0=3D 0 =3D default;
};
Not pretty. =E2=80=8EBut not the end of the world.=C2=A0
I agree with the original sentiment that 'you must override this function' =
is more closely related to 'override' and 'final' than it is to 'this funct=
ion is implemented the default way', so a 'pure' or 'abstract' or 'must_ove=
rride' is better than =3D 0.=C2=A0
But is it worth it? =C2=A0
Sent=C2=A0from=C2=A0my=C2=A0BlackBerry=C2=A0portable=C2=A0Babbage=C2=A0Devi=
ce
=C2=A0 Original Message =C2=A0
From: Magnus Fromreide
Sent: Tuesday, July 12, 2016 6:29 PM
To: std-proposals@isocpp.org
Reply To: std-proposals@isocpp.org
Subject: Re: [std-proposals] Re: `pure` virt-specifier-seq to denote pure v=
irtual functions.
On Tue, Jul 12, 2016 at 02:23:15PM -0700, Thiago Macieira wrote:
> Em ter=C3=A7a-feira, 12 de julho de 2016, =C3=A0s 14:03:07 PDT, ezmagicia=
n@gmail.com=20
> escreveu:
> > - It would allow for writing definitions for pure virtual functions=20
> > without being required to define them outside the class declaration in =
a=20
> > consistent manner with other C++ code.
>=20
> How?
>=20
> You can't write a body for a defaulted or deleted function, so how does t=
he=20
> syntax for default/delete allow for that when expanded to include the=20
> "abstract" keyword?
As far as I understand the proposal the idea is to be able to write
struct x {
virtual ~x() abstract =3D default;
};
rather than
struct x {
virtual ~x() =3D 0;
};
inline x::~x() =3D default;
> If we're going to change the syntax anyway, why wouldn't we allow writing=
a=20
> body after "=3D 0" ?
I agree that it is a good idea but I think it is unrelated to the proposal =
at
hand which seems to be more about defaulted functions than anything else.
/MF
--=20
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 e=
mail 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/20160712222916.GA32041%40noemi.
--=20
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 e=
mail 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/20160712224458.4919375.36403.13928%40gmail.com.
.
Author: ezmagician@gmail.com
Date: Tue, 12 Jul 2016 15:45:09 -0700 (PDT)
Raw View
------=_Part_400_865859163.1468363509138
Content-Type: multipart/alternative;
boundary="----=_Part_401_158767035.1468363509139"
------=_Part_401_158767035.1468363509139
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Whoops, Bar::z() should be labeled `abstract`, not `pure`.
I am still not used to using the abstract keyword (although I agree it is=
=20
better than `pure`).
On Tuesday, July 12, 2016 at 6:43:04 PM UTC-4, ezmag...@gmail.com wrote:
>
> Magnus is correct.
>
>>
> You can't write a body for a defaulted or deleted function, so how does=
=20
>> the=20
>> syntax for default/delete allow for that when expanded to include the=20
>> "abstract" keyword?=20
>
>
> The reasoning I gave in my first response post was that `=3D 0` is *not* =
like=20
> default or delete in that it does not provide a definition.
> The `Foo() =3D ...` syntax for default and delete is used with respect to=
=20
> the function's definition, but `=3D 0` does not follow that pattern.
> `=3D 0` only specifies that the function is pure virtual. It does not=20
> provide a definition like `=3D default` or `=3D delete`.
> This is why I suggested that the "pure" specifier (`abstract` in this=20
> case) be used in the context of virt-specifiers like override and final.
> This proposal shouldn't change how default and delete work. They are=20
> unrelated.
>
> Why is it a problem to allow the function body after "=3D"?=20
>
>
> *Inconsistency*. The only situations where `=3D` is used after a function=
=20
> declaration is to mark a virtual function pure, and in the case of defaul=
t=20
> and delete.
> None of these three allow for a definition to be written after the `=3D`=
=20
> syntax (rightfully so for default and delete, arguably so for =3D 0).
> However, there is nothing inconsistent with the `void foo() abstract { ..=
..=20
> }` syntax because it is allowed for override and final already.
>
> Does this not break the pattern?
>
> struct Foo() {
> Foo() =3D default; // OK, no definition allowed after =3D.
> Foo(Foo const&) =3D delete; // OK, no definition allowed after =3D
> void bar() =3D abstract { ... } // Why for abstract?
> }
>
> Is this not more consistent?
>
> struct Foo() {
> virtual void x() abstract;
> virtual void y() abstract;
> virtual void z() abstract;
> }
>
> struct Bar() {
> virtual void x() override { ... } // OK
> virtual void y() override final { ... } // OK
> virtual void z() override pure { ... } // OK
> }
>
> On Tuesday, July 12, 2016 at 6:29:20 PM UTC-4, Magnus Fromreide wrote:
>>
>> On Tue, Jul 12, 2016 at 02:23:15PM -0700, Thiago Macieira wrote:=20
>> > Em ter=C3=A7a-feira, 12 de julho de 2016, =C3=A0s 14:03:07 PDT,=20
>> ezmag...@gmail.com=20
>> > escreveu:=20
>> > > - It would allow for writing definitions for pure virtual=20
>> functions=20
>> > > without being required to define them outside the class=20
>> declaration in a=20
>> > > consistent manner with other C++ code.=20
>> >=20
>> > How?=20
>> >=20
>> > You can't write a body for a defaulted or deleted function, so how doe=
s=20
>> the=20
>> > syntax for default/delete allow for that when expanded to include the=
=20
>> > "abstract" keyword?=20
>>
>> As far as I understand the proposal the idea is to be able to write=20
>>
>> struct x {=20
>> virtual ~x() abstract =3D default;=20
>> };=20
>>
>> rather than=20
>>
>> struct x {=20
>> virtual ~x() =3D 0;=20
>> };=20
>>
>> inline x::~x() =3D default;=20
>>
>> > If we're going to change the syntax anyway, why wouldn't we allow=20
>> writing a=20
>> > body after "=3D 0" ?=20
>>
>> I agree that it is a good idea but I think it is unrelated to the=20
>> proposal at=20
>> hand which seems to be more about defaulted functions than anything else=
..=20
>>
>> /MF=20
>>
>
--=20
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 e=
mail 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/3fc512b5-3b0c-4d9a-a76c-817e49333dba%40isocpp.or=
g.
------=_Part_401_158767035.1468363509139
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Whoops, Bar::z() should be labeled `abstract`, not `pure`.=
<div>I am still not used to using the abstract keyword (although I agree it=
is better than `pure`).<br><br>On Tuesday, July 12, 2016 at 6:43:04 PM UTC=
-4, ezmag...@gmail.com wrote:<blockquote class=3D"gmail_quote" style=3D"mar=
gin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><=
div dir=3D"ltr"><div>Magnus is correct.</div><blockquote class=3D"gmail_quo=
te" style=3D"border-left-width:1px;border-left-style:solid;border-left-colo=
r:rgb(204,204,204);padding-left:1ex"></blockquote><div><br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width=
:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-lef=
t:1ex">You can't write a body for a defaulted or deleted function, so h=
ow does the=C2=A0<br>syntax for default/delete allow for that when expanded=
to include the=C2=A0<br>"abstract" keyword?=C2=A0</blockquote><d=
iv><div><br></div><div>The reasoning I gave in my first response post was t=
hat `=3D 0` is=C2=A0<i>not</i>=C2=A0like default or delete in that it does =
not provide a definition.</div><div>The `Foo() =3D ...` syntax for default =
and delete is used with respect to the function's definition, but `=3D =
0` does not follow that pattern.</div><div>`=3D 0` only specifies that the =
function is pure virtual. It does not provide a definition like `=3D defaul=
t` or `=3D delete`.</div><div>This is why I suggested that the "pure&q=
uot; specifier (`abstract` in this case) be used in the context of virt-spe=
cifiers like override and final.</div><div>This proposal shouldn't chan=
ge how default and delete work. They are unrelated.</div><div><br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-lef=
t-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padd=
ing-left:1ex">Why is it a problem to allow the function body after "=
=3D"?=C2=A0</blockquote><div><br></div><div><b>Inconsistency</b>. The =
only situations where `=3D` is used after a function declaration is to mark=
a virtual function pure, and in the case of default and delete.</div><div>=
None of these three allow for a definition to be written after the `=3D` sy=
ntax (rightfully so for default and delete, arguably so for =3D 0).</div><d=
iv>However, there is nothing inconsistent with the `void foo() abstract { .=
... }` syntax because it is allowed for override and final already.</div><di=
v><br></div><div>Does this not break the pattern?</div><div><br></div><div>=
<div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;backgr=
ound-color:rgb(250,250,250)"><code><div><span style=3D"color:#008">struct</=
span><span style=3D"color:#000"> </span><span style=3D"color:#606">Foo</spa=
n><span style=3D"color:#660">()</span><span style=3D"color:#000"> </span><s=
pan style=3D"color:#660">{</span><span style=3D"color:#000"><br>=C2=A0 </sp=
an><span style=3D"color:#606">Foo</span><span style=3D"color:#660">()</span=
><span style=3D"color:#000"> </span><span style=3D"color:#660">=3D</span><s=
pan style=3D"color:#000"> </span><span style=3D"color:#008">default</span><=
span style=3D"color:#660">;</span><span style=3D"color:#000"> =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</span><span style=3D"color:#800">// OK,=
no definition allowed after =3D.</span><span style=3D"color:#000"><br>=C2=
=A0 </span><span style=3D"color:#606">Foo</span><span style=3D"color:#660">=
(</span><span style=3D"color:#606">Foo</span><span style=3D"color:#000"> </=
span><span style=3D"color:#008">const</span><span style=3D"color:#660">&=
;)</span><span style=3D"color:#000"> </span><span style=3D"color:#660">=3D<=
/span><span style=3D"color:#000"> </span><span style=3D"color:#008">delete<=
/span><span style=3D"color:#660">;</span><span style=3D"color:#000"> =C2=A0=
=C2=A0 </span><font color=3D"#666600"><span style=3D"color:#800">// OK, no=
definition allowed after =3D</span></font><span style=3D"color:#000"><br>=
=C2=A0 </span><font color=3D"#660066"><span style=3D"color:#008">void</span=
><span style=3D"color:#000"> bar</span><span style=3D"color:#660">()</span>=
<span style=3D"color:#000"> </span><span style=3D"color:#660">=3D</span><sp=
an style=3D"color:#000"> </span><span style=3D"color:#008">abstract</span><=
span style=3D"color:#000"> </span><span style=3D"color:#660">{</span><span =
style=3D"color:#000"> </span><span style=3D"color:#660">...</span><span sty=
le=3D"color:#000"> </span><span style=3D"color:#660">}</span><span style=3D=
"color:#000"> </span><span style=3D"color:#800">// Why for abstract?</span>=
</font><span style=3D"color:#000"><br></span><span style=3D"color:#660">}</=
span></div></code></div><br>Is this not more consistent?</div><div><br></di=
v><div><div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-word=
;background-color:rgb(250,250,250)"><code><div><span style=3D"color:#008">s=
truct</span><span style=3D"color:#000"> </span><span style=3D"color:#606">F=
oo</span><span style=3D"color:#660">()</span><span style=3D"color:#000"> </=
span><span style=3D"color:#660">{</span><span style=3D"color:#000"><br>=C2=
=A0 </span><span style=3D"color:#008">virtual</span><span style=3D"color:#0=
00"> </span><span style=3D"color:#008">void</span><span style=3D"color:#000=
"> x</span><span style=3D"color:#660">()</span><span style=3D"color:#000"> =
</span><span style=3D"color:#008">abstract</span><span style=3D"color:#660"=
>;</span><span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:=
#008">virtual</span><span style=3D"color:#000"> </span><span style=3D"color=
:#008">void</span><span style=3D"color:#000"> y</span><span style=3D"color:=
#660">()</span><span style=3D"color:#000"> </span><span style=3D"color:#008=
">abstract</span><span style=3D"color:#660">;</span><span style=3D"color:#0=
00"><br>=C2=A0 </span><span style=3D"color:#008">virtual</span><span style=
=3D"color:#000"> </span><span style=3D"color:#008">void</span><span style=
=3D"color:#000"> z</span><span style=3D"color:#660">()</span><span style=3D=
"color:#000"> </span><span style=3D"color:#008">abstract</span><span style=
=3D"color:#660">;</span><span style=3D"color:#000"><br></span><span style=
=3D"color:#660">}</span><span style=3D"color:#000"><br><br></span><span sty=
le=3D"color:#008">struct</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#606">Bar</span><span style=3D"color:#660">()</span><span style=
=3D"color:#000"> </span><span style=3D"color:#660">{</span><span style=3D"c=
olor:#000"><br>=C2=A0 </span><span style=3D"color:#008">virtual</span><span=
style=3D"color:#000"> </span><span style=3D"color:#008">void</span><span s=
tyle=3D"color:#000"> x</span><span style=3D"color:#660">()</span><span styl=
e=3D"color:#000"> </span><span style=3D"color:#008">override</span><span st=
yle=3D"color:#000"> =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color:#660">=
{</span><span style=3D"color:#000"> </span><span style=3D"color:#660">...</=
span><span style=3D"color:#000"> </span><span style=3D"color:#660">}</span>=
<span style=3D"color:#000"> </span><span style=3D"color:#800">// OK</span><=
span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#008">virt=
ual</span><span style=3D"color:#000"> </span><span style=3D"color:#008">voi=
d</span><span style=3D"color:#000"> y</span><span style=3D"color:#660">()</=
span><span style=3D"color:#000"> </span><font color=3D"#000088"><span style=
=3D"color:#008">override</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#008">final</span><span style=3D"color:#000"> </span><span styl=
e=3D"color:#660">{</span><span style=3D"color:#000"> </span><span style=3D"=
color:#660">...</span><span style=3D"color:#000"> </span><span style=3D"col=
or:#660">}</span><span style=3D"color:#000"> </span><span style=3D"color:#8=
00">// OK</span><span style=3D"color:#000"><br></span></font><span style=3D=
"color:#000">=C2=A0 </span><span style=3D"color:#008">virtual</span><span s=
tyle=3D"color:#000"> </span><span style=3D"color:#008">void</span><span sty=
le=3D"color:#000"> z</span><span style=3D"color:#660">()</span><span style=
=3D"color:#000"> </span><span style=3D"color:#008">override</span><span sty=
le=3D"color:#000"> pure =C2=A0</span><span style=3D"color:#660">{</span><sp=
an style=3D"color:#000"> </span><span style=3D"color:#660">...</span><span =
style=3D"color:#000"> </span><span style=3D"color:#660">}</span><span style=
=3D"color:#000"> </span><span style=3D"color:#800">// OK</span><span style=
=3D"color:#000"><br></span><span style=3D"color:#660">}</span></div></code>=
</div></div><br>On Tuesday, July 12, 2016 at 6:29:20 PM UTC-4, Magnus Fromr=
eide wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:=
0.8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Jul 12, 2016 at =
02:23:15PM -0700, Thiago Macieira wrote:
<br>> Em ter=C3=A7a-feira, 12 de julho de 2016, =C3=A0s 14:03:07 PDT, <a=
rel=3D"nofollow">ezmag...@gmail.com</a>=20
<br>> escreveu:
<br>> > =C2=A0 =C2=A0- It would allow for writing definitions for pur=
e virtual functions=20
<br>> > =C2=A0 =C2=A0without being required to define them outside th=
e class declaration in a=20
<br>> > consistent manner with other C++ code.
<br>>=20
<br>> How?
<br>>=20
<br>> You can't write a body for a defaulted or deleted function, so=
how does the=20
<br>> syntax for default/delete allow for that when expanded to include =
the=20
<br>> "abstract" keyword?
<br>
<br>As far as I understand the proposal the idea is to be able to write
<br>
<br>struct x {
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0virtual ~x() abstract =
=3D default;
<br>};
<br>
<br>rather than
<br>
<br>struct x {
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0virtual ~x() =3D 0;
<br>};
<br>
<br>inline x::~x() =3D default;
<br>
<br>> If we're going to change the syntax anyway, why wouldn't w=
e allow writing a=20
<br>> body after "=3D 0" ?
<br>
<br>I agree that it is a good idea but I think it is unrelated to the propo=
sal at
<br>hand which seems to be more about defaulted functions than anything els=
e.
<br>
<br>/MF
<br></blockquote></div></div></blockquote></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/3fc512b5-3b0c-4d9a-a76c-817e49333dba%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/3fc512b5-3b0c-4d9a-a76c-817e49333dba=
%40isocpp.org</a>.<br />
------=_Part_401_158767035.1468363509139--
------=_Part_400_865859163.1468363509138--
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Tue, 12 Jul 2016 16:37:18 -0700
Raw View
Em ter=C3=A7a-feira, 12 de julho de 2016, =C3=A0s 14:31:56 PDT, Nicol Bolas=
escreveu:
> > How?=20
> >=20
> > You can't write a body for a defaulted or deleted function, so how does=
=20
> > the=20
> > syntax for default/delete allow for that when expanded to include the=
=20
> > "abstract" keyword?
>=20
> Because it doesn't use `=3D`.
That's not what I had understood. The moment we started talking about=20
defaulted and deleted, I thought we were talking about "=3D abstract".
Aside from a virtual destructor, you can't default or delete a virtual=20
function.
--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--=20
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 e=
mail 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/2733216.R8BDEMOPFL%40tjmaciei-mobl1.
.
Author: Patrice Roy <patricer@gmail.com>
Date: Wed, 13 Jul 2016 10:15:58 -0400
Raw View
--001a11428a365355b30537850635
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
There have been proposals for [[pure]] in the past (one of which I
championed unsuccessfully in Kona), and I expect others to follow. It would
probably be a good idea to keep that word for =C2=ABpure=C2=BB functions in=
a way
that is analog to what Matthew described, if only to avoid confusion, and
use other words for abstract methods.
Cheers!
2016-07-13 10:05 GMT-04:00 Matthew Woehlke <mwoehlke.floss@gmail.com>:
> On 2016-07-12 16:58, D. B. wrote:
> > On Tue, Jul 12, 2016 at 5:20 PM, Tony V E wrote:
> >> On Mon, Jul 11, 2016 at 11:40 PM, Ricardo Fabiano de Andrade wrote:
> >>
> >>> On top of that, `pure` some may want using it with the same meaning a=
s
> it
> >>> has in D:
> >>> https://dlang.org/spec/function.html#pure-functions
> >>
> >> Definitely.
> >
> > *Why?* C++ and D are unrelated. Why should C++ start doing things just
> > because some other language does?
>
> Ahem. To rephrase, some people might want `pure` to have the same or
> similar meaning in ISO C++ as it does for GCC and clang, and as in the
> general fields of computer science and mathematics. (As well as,
> incidentally, some other programming languages, including D. And Fortran.=
)
>
> To wit: https://en.wikipedia.org/wiki/Pure_function (note that this is
> NOT specific to a particular programming language!).
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/nm5hr5%24m9v=
%241%40ger.gmane.org
> .
>
--=20
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 e=
mail 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/CAKiZDp3ybkmX93KVH5dOOuK6TZhNs35Jcq_%2BWEzZjQiO2=
mmcLg%40mail.gmail.com.
--001a11428a365355b30537850635
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>There have been proposals for [[pure]] in the past (o=
ne of which I championed unsuccessfully in Kona), and I expect others to fo=
llow. It would probably be a good idea to keep that word for =C2=ABpure=C2=
=BB functions in a way that is analog to what Matthew described, if only to=
avoid confusion, and use other words for abstract methods.<br><br></div>Ch=
eers!<br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">20=
16-07-13 10:05 GMT-04:00 Matthew Woehlke <span dir=3D"ltr"><<a href=3D"m=
ailto:mwoehlke.floss@gmail.com" target=3D"_blank">mwoehlke.floss@gmail.com<=
/a>></span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
..8ex;border-left:1px #ccc solid;padding-left:1ex">On 2016-07-12 16:58, D. B=
.. wrote:<br>
> On Tue, Jul 12, 2016 at 5:20 PM, Tony V E wrote:<br>
<span class=3D"">>> On Mon, Jul 11, 2016 at 11:40 PM, Ricardo Fabiano=
de Andrade wrote:<br>
>><br>
>>> On top of that, `pure` some may want using it with the same me=
aning as it<br>
>>> has in D:<br>
>>> <a href=3D"https://dlang.org/spec/function.html#pure-functions=
" rel=3D"noreferrer" target=3D"_blank">https://dlang.org/spec/function.html=
#pure-functions</a><br>
>><br>
>> Definitely.<br>
><br>
</span>> *Why?* C++ and D are unrelated. Why should C++ start doing thin=
gs just<br>
<span class=3D"">> because some other language does?<br>
<br>
</span>Ahem. To rephrase, some people might want `pure` to have the same or=
<br>
similar meaning in ISO C++ as it does for GCC and clang, and as in the<br>
general fields of computer science and mathematics. (As well as,<br>
incidentally, some other programming languages, including D. And Fortran.)<=
br>
<br>
To wit: <a href=3D"https://en.wikipedia.org/wiki/Pure_function" rel=3D"nore=
ferrer" target=3D"_blank">https://en.wikipedia.org/wiki/Pure_function</a> (=
note that this is<br>
NOT specific to a particular programming language!).<br>
<br>
--<br>
Matthew<br>
<span class=3D""><br>
--<br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-propo=
sals+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>
</span>To view this discussion on the web visit <a href=3D"https://groups.g=
oogle.com/a/isocpp.org/d/msgid/std-proposals/nm5hr5%24m9v%241%40ger.gmane.o=
rg" rel=3D"noreferrer" target=3D"_blank">https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/nm5hr5%24m9v%241%40ger.gmane.org</a>.<br>
</blockquote></div><br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/CAKiZDp3ybkmX93KVH5dOOuK6TZhNs35Jcq_%=
2BWEzZjQiO2mmcLg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3ybkmX93=
KVH5dOOuK6TZhNs35Jcq_%2BWEzZjQiO2mmcLg%40mail.gmail.com</a>.<br />
--001a11428a365355b30537850635--
.