Topic: Adding "abstract" as a keyword to denote a pure
Author: reynaldbrassard599@gmail.com
Date: Sat, 23 Jan 2016 10:59:05 -0800 (PST)
Raw View
------=_Part_3795_26343783.1453575545705
Content-Type: multipart/alternative;
boundary="----=_Part_3796_1472162733.1453575545705"
------=_Part_3796_1472162733.1453575545705
Content-Type: text/plain; charset=UTF-8
I think it would be a good idea to add "= abstract" to replace the "= 0"
syntax for pure virtual functions in a class. I believe it would be a good
addition to the language, as It is more explicit in explaining what you are
creating. It would make C++ look more unified in syntax as well, to match
the "= default" and "= deleted" keywords added in C++11.
I am aware that Microsoft Visual Studio currently uses the keyword in C++,
for example:
class Foo {
public:
bar() abstract;
};
or
class Foo abstract {
public:
void bar() abstract;
};
This works in Microsoft Visual Studio, but is currently not portable to
other compilers. Also I believe this example looks more consistent
syntactically:
class Foo {
public:
Foo() = default;
Foo(const Foo&) = delete;
Foo& operator=(const Foo&) = delete;
~Foo() = default;
virtual void bar() = abstract;
};
This to me looks more readable than the example below:
class Foo {
public:
Foo() = default;
Foo(const Foo&) = delete;
Foo& operator=(const Foo&) = delete;
~Foo() = default;
virtual void bar() = 0;
};
To someone learning the language, the "= abstract" is much more readable
and explicit in its purpose.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_3796_1472162733.1453575545705
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I think it would be a good idea to add "=3D abstract&=
quot; to replace the "=3D 0" syntax for pure virtual functions in=
a class. I believe it would be a good addition to the language, as It is m=
ore explicit in explaining what you are creating. It would make C++ look mo=
re unified in syntax as well, to match the "=3D default" and &quo=
t;=3D deleted" keywords added in C++11.<div><br></div><div>I am aware =
that Microsoft Visual Studio currently uses the keyword in C++, for example=
:</div><div><br></div><div>class Foo {</div><div>public:</div><div>=C2=A0 =
=C2=A0 =C2=A0 bar() abstract;</div><div>};</div><div><br></div><div>or</div=
><div><br></div><div><div>class Foo abstract {</div><div>public:</div><div>=
=C2=A0 =C2=A0 =C2=A0 void bar() abstract;</div><div>};</div></div><div><br>=
</div><div>This works in=C2=A0Microsoft Visual Studio, but is currently not=
portable to other compilers. Also I believe this example looks more consis=
tent syntactically:</div><div><br></div><div>class Foo {</div><div>public:<=
/div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0Foo() =3D default;</div><div>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0Foo(const Foo&) =3D delete;</div><div>=C2=A0 =C2=A0=
=C2=A0 =C2=A0Foo& operator=3D(const Foo&) =3D delete;</div><div>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0~Foo() =3D default;</div><div>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0virtual void bar() =3D abstract;</div><div>};</div><div><br></div=
><div>This to me looks more readable than the example below:</div><div><br>=
</div><div><div>class Foo {</div><div>public:</div><div>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0Foo() =3D default;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0Foo(const=
Foo&) =3D delete;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0Foo& operat=
or=3D(const Foo&) =3D delete;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0~Foo=
() =3D default;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0virtual void bar() =3D=
0;</div><div>};</div></div><div><br></div><div>To someone learning the lan=
guage, the "=3D abstract" is much more readable and explicit in i=
ts purpose.</div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
------=_Part_3796_1472162733.1453575545705--
------=_Part_3795_26343783.1453575545705--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sat, 23 Jan 2016 21:01:16 +0200
Raw View
On 23 January 2016 at 20:59, <reynaldbrassard599@gmail.com> wrote:
> I think it would be a good idea to add "= abstract" to replace the "= 0"
> syntax for pure virtual functions in a class. I believe it would be a good
> addition to the language, as It is more explicit in explaining what you are
> creating. It would make C++ look more unified in syntax as well, to match
> the "= default" and "= deleted" keywords added in C++11.
>
> I am aware that Microsoft Visual Studio currently uses the keyword in C++,
> for example:
>
> class Foo {
> public:
> bar() abstract;
> };
So why on earth would we, instead of standardizing a context-sensitive
keyword that
is existing practice, subtly modify it so that instead of
bar() abstract;
it would be
bar() = abstract;
?
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: reynaldbrassard599@gmail.com
Date: Sat, 23 Jan 2016 11:08:42 -0800 (PST)
Raw View
------=_Part_964_1373999020.1453576123013
Content-Type: multipart/alternative;
boundary="----=_Part_965_98265219.1453576123013"
------=_Part_965_98265219.1453576123013
Content-Type: text/plain; charset=UTF-8
>
> So why on earth would we, instead of standardizing a context-sensitive
> keyword that
> is existing practice, subtly modify it so that instead of
> bar() abstract;
> it would be
> bar() = abstract;
> ?
>
If they decided to use the Microsoft Visual Studio version and standardize
it across all compilers, I would not disagree. But as it is not currently a
standard, it is still open to change. I was just proposing an idea to keep
the language consistent.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_965_98265219.1453576123013
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">So why on ear=
th would we, instead of standardizing a context-sensitive
<br>keyword that
<br>is existing practice, subtly modify it so that instead of
<br>bar() abstract;
<br>it would be
<br>bar() =3D abstract;
<br>?
<br></blockquote><div><br></div><div>If they decided to use the Microsoft V=
isual Studio version and standardize it across all compilers, I would not d=
isagree. But as it is not currently a standard, it is still open to change.=
I was just proposing an idea to keep the language consistent.</div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
------=_Part_965_98265219.1453576123013--
------=_Part_964_1373999020.1453576123013--
.
Author: Zhihao Yuan <zy@miator.net>
Date: Sat, 23 Jan 2016 14:06:01 -0600
Raw View
On Sat, Jan 23, 2016 at 1:01 PM, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
>
> So why on earth would we, instead of standardizing a context-sensitive
> keyword that
> is existing practice, subtly modify it so that instead of
> bar() abstract;
> it would be
> bar() = abstract;
> ?
Because = 0, = default and = delete all define this function,
while the current context sensitive keywords virtual and
override qualifies a signature, no matter whether it's a
definition. So = abstract looks following this trend.
Being said that, I feel that = 0 works better :(
--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://bit.ly/blog4bsd
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: "T. C." <rs2740@gmail.com>
Date: Sat, 23 Jan 2016 12:19:13 -0800 (PST)
Raw View
------=_Part_3216_1374818210.1453580353211
Content-Type: multipart/alternative;
boundary="----=_Part_3217_80266847.1453580353211"
------=_Part_3217_80266847.1453580353211
Content-Type: text/plain; charset=UTF-8
On Saturday, January 23, 2016 at 3:06:04 PM UTC-5, Zhihao Yuan wrote:
>
>
> Because = 0, = default and = delete all define this function,
> while the current context sensitive keywords virtual and
> override qualifies a signature, no matter whether it's a
> definition. So = abstract looks following this trend.
>
= 0 is not a definition, though.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_3217_80266847.1453580353211
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Saturday, January 23, 2016 at 3:06:04 PM UTC-5,=
Zhihao Yuan wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
<br>Because =3D 0, =3D default and =3D delete all define this function,
<br>while the current context sensitive keywords virtual and
<br>override qualifies a signature, no matter whether it's a
<br>definition. =C2=A0So =3D abstract looks following this trend.=C2=A0<br>=
</blockquote><div>=C2=A0</div><div>=3D 0 is not a definition, though.=C2=A0=
</div><div><br></div><div><br></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
------=_Part_3217_80266847.1453580353211--
------=_Part_3216_1374818210.1453580353211--
.
Author: Sam Kellett <samkellett@gmail.com>
Date: Sat, 23 Jan 2016 20:57:50 +0000
Raw View
--047d7b342fd8c06e8b052a0696f6
Content-Type: text/plain; charset=UTF-8
On 23 January 2016 at 20:19, T. C. <rs2740@gmail.com> wrote:
>
>
> On Saturday, January 23, 2016 at 3:06:04 PM UTC-5, Zhihao Yuan wrote:
>>
>>
>> Because = 0, = default and = delete all define this function,
>> while the current context sensitive keywords virtual and
>> override qualifies a signature, no matter whether it's a
>> definition. So = abstract looks following this trend.
>>
>
> = 0 is not a definition, though.
>
i'm guessing this is saying "this function pointer is null", aka '= NULL'
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
--047d7b342fd8c06e8b052a0696f6
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 23 January 2016 at 20:19, T. C. <span dir=3D"ltr"><<a href=3D"mai=
lto:rs2740@gmail.com" target=3D"_blank">rs2740@gmail.com</a>></span> wro=
te:<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"><span class=3D""><br=
><br>On Saturday, January 23, 2016 at 3:06:04 PM UTC-5, Zhihao Yuan wrote:<=
blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border=
-left:1px #ccc solid;padding-left:1ex">
<br>Because =3D 0, =3D default and =3D delete all define this function,
<br>while the current context sensitive keywords virtual and
<br>override qualifies a signature, no matter whether it's a
<br>definition.=C2=A0 So =3D abstract looks following this trend.=C2=A0<br>=
</blockquote><div>=C2=A0</div></span><div>=3D 0 is not a definition, though=
..</div></div></blockquote><div><br></div><div>i'm guessing this is sayi=
ng "this function pointer is null", aka '=3D NULL'<br></d=
iv></div></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
--047d7b342fd8c06e8b052a0696f6--
.
Author: reynaldbrassard599@gmail.com
Date: Sat, 23 Jan 2016 13:02:39 -0800 (PST)
Raw View
------=_Part_4_1738156613.1453582959426
Content-Type: multipart/alternative;
boundary="----=_Part_5_224552317.1453582959426"
------=_Part_5_224552317.1453582959426
Content-Type: text/plain; charset=UTF-8
>
> i'm guessing this is saying "this function pointer is null", aka '= NULL'
>
Yes, except being more explicit about its functionality.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_5_224552317.1453582959426
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div class=3D"gmail_quote"><div>i'm guessing this is saying "t=
his function pointer is null", aka '=3D NULL'<br></div></div><=
/div></blockquote><div><br></div><div>Yes, except being more explicit about=
its functionality.</div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
------=_Part_5_224552317.1453582959426--
------=_Part_4_1738156613.1453582959426--
.
Author: Nevin Liber <nevin@cplusplusguy.com>
Date: Sat, 23 Jan 2016 16:15:08 -0600
Raw View
--001a113ecd9a893d82052a07adc6
Content-Type: text/plain; charset=UTF-8
On 23 January 2016 at 12:59, <reynaldbrassard599@gmail.com> wrote:
> I think it would be a good idea to add "= abstract" to replace the "= 0"
> syntax for pure virtual functions in a class.
>
#define abstract 0
Done. :-)
Given the committee's limited resources, I'd much rather we work on things
that we can't express now or that are hard to express now than synonyms.
Also, adding a second syntax to do the exact same thing as another syntax
increases the knowledge needed for code readers to understand C++.
--
Nevin ":-)" Liber <mailto:nevin@cplusplusguy.com <nevin@eviloverlord.com>>
+1-847-691-1404
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
--001a113ecd9a893d82052a07adc6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On 23 January 2016 at 12:59, <span dir=3D"ltr"><<a hre=
f=3D"mailto:reynaldbrassard599@gmail.com" target=3D"_blank">reynaldbrassard=
599@gmail.com</a>></span> wrote:<br><div class=3D"gmail_extra"><div clas=
s=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">I think i=
t would be a good idea to add "=3D abstract" to replace the "=
;=3D 0" syntax for pure virtual functions in a class.</div></blockquot=
e><div><br></div><div>#define abstract 0</div><div><br></div><div>Done. :-)=
</div></div><div><br></div><div>Given the committee's limited resources=
, I'd much rather we work on things that we can't express now or th=
at are hard to express now than synonyms.</div><div><br></div><div>Also, ad=
ding a second syntax to do the exact same thing as another syntax increases=
the knowledge needed for code readers to understand C++.<br clear=3D"all">=
<div><br></div>-- <br><div class=3D"gmail_signature"><div dir=3D"ltr">=C2=
=A0Nevin ":-)" Liber=C2=A0 <mailto:<a href=3D"mailto:nevin@evi=
loverlord.com" target=3D"_blank">nevin@cplusplusguy.com</a>>=C2=A0 +1-84=
7-691-1404<br></div></div>
</div></div>
</div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
--001a113ecd9a893d82052a07adc6--
.
Author: reynaldbrassard599@gmail.com
Date: Sat, 23 Jan 2016 14:18:48 -0800 (PST)
Raw View
------=_Part_4436_2027591773.1453587528741
Content-Type: multipart/alternative;
boundary="----=_Part_4437_1052407347.1453587528748"
------=_Part_4437_1052407347.1453587528748
Content-Type: text/plain; charset=UTF-8
On Saturday, 23 January 2016 14:15:50 UTC-8, Nevin Liber wrote:
>
> On 23 January 2016 at 12:59, <reynaldbr...@gmail.com <javascript:>> wrote:
>
>> I think it would be a good idea to add "= abstract" to replace the "= 0"
>> syntax for pure virtual functions in a class.
>>
>
> #define abstract 0
>
> Done. :-)
>
> Given the committee's limited resources, I'd much rather we work on things
> that we can't express now or that are hard to express now than synonyms.
>
> Also, adding a second syntax to do the exact same thing as another syntax
> increases the knowledge needed for code readers to understand C++.
>
> --
> Nevin ":-)" Liber <mailto:ne...@cplusplusguy.com <javascript:>>
> +1-847-691-1404
>
I understand the sentiment, but I don't see the harm in it being discussed
regardless. Also, the preprocessor definition does not work on all
compilers.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_4437_1052407347.1453587528748
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<br><br>On Saturday, 23 January 2016 14:15:50 UTC-8, Nevin Liber wrote:<bl=
ockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border=
-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">On 23 January 20=
16 at 12:59, <span dir=3D"ltr"><<a href=3D"javascript:" target=3D"_blan=
k" gdf-obfuscated-mailto=3D"4KsFlAUAGQAJ" rel=3D"nofollow" onmousedown=3D"t=
his.href=3D'javascript:';return true;" onclick=3D"this.href=3D'=
javascript:';return true;">reynaldbr...@gmail.com</a>></span> wrote:=
<br><div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr">I think it would be a good idea to add "=3D abstract" to=
replace the "=3D 0" syntax for pure virtual functions in a class=
..</div></blockquote><div><br></div><div>#define abstract 0</div><div><br></=
div><div>Done. :-)</div></div><div><br></div><div>Given the committee's=
limited resources, I'd much rather we work on things that we can't=
express now or that are hard to express now than synonyms.</div><div><br><=
/div><div>Also, adding a second syntax to do the exact same thing as anothe=
r syntax increases the knowledge needed for code readers to understand C++.=
<br clear=3D"all"><div><br></div>-- <br><div><div dir=3D"ltr">=C2=A0Nevin &=
quot;:-)" Liber=C2=A0 <mailto:<a href=3D"javascript:" target=3D"_bl=
ank" gdf-obfuscated-mailto=3D"4KsFlAUAGQAJ" rel=3D"nofollow" onmousedown=3D=
"this.href=3D'javascript:';return true;" onclick=3D"this.href=3D=
9;javascript:';return true;">ne...@cplusplusguy.com</a><wbr>>=C2=A0 =
+1-847-691-1404<br></div></div></div></div></div></blockquote><div><br></di=
v><div>I understand the sentiment, but I don't see the harm in it being=
discussed regardless. Also, the preprocessor definition does not work on a=
ll compilers.</div>
<p></p>
-- <br />
<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+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
------=_Part_4437_1052407347.1453587528748--
------=_Part_4436_2027591773.1453587528741--
.
Author: Moritz Klammler <moritz.klammler@gmail.com>
Date: Sat, 23 Jan 2016 23:26:41 +0100
Raw View
Sam Kellett <samkellett@gmail.com> writes:
> On 23 January 2016 at 20:19, T. C. <rs2740@gmail.com> wrote:
>
>>
>>
>> On Saturday, January 23, 2016 at 3:06:04 PM UTC-5, Zhihao Yuan wrote:
>>>
>>>
>>> Because = 0, = default and = delete all define this function,
>>> while the current context sensitive keywords virtual and
>>> override qualifies a signature, no matter whether it's a
>>> definition. So = abstract looks following this trend.
>>>
>>
>> = 0 is not a definition, though.
>>
>
> i'm guessing this is saying "this function pointer is null", aka
> '= NULL'
This is exacty my reading of the construct and I like it quite a lot.
I'm thinking of it as setting the respective slot in the vtable to the
null pointer. Consequently, when C++11 came out, I was quite
disappointed to find out that `= nullptr` did not work.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
Date: Sat, 23 Jan 2016 14:54:28 -0800 (PST)
Raw View
------=_Part_4212_156391183.1453589668673
Content-Type: multipart/alternative;
boundary="----=_Part_4213_105468873.1453589668674"
------=_Part_4213_105468873.1453589668674
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Saturday, January 23, 2016 at 2:26:45 PM UTC-8, Moritz Klammler wrote:
>
> Sam Kellett <samke...@gmail.com <javascript:>> writes:=20
> > On 23 January 2016 at 20:19, T. C. <rs2...@gmail.com <javascript:>>=20
> wrote:=20
> >> On Saturday, January 23, 2016 at 3:06:04 PM UTC-5, Zhihao Yuan wrote:=
=20
> >>>=20
> >>> Because =3D 0, =3D default and =3D delete all define this function,=
=20
> >>> while the current context sensitive keywords virtual and=20
> >>> override qualifies a signature, no matter whether it's a=20
> >>> definition. So =3D abstract looks following this trend.=20
> >>=20
> >> =3D 0 is not a definition, though.=20
> >=20
> > i'm guessing this is saying "this function pointer is null", aka=20
> > '=3D NULL'=20
>
> This is exacty my reading of the construct and I like it quite a lot.=20
>
I can see why Moritz and Sam want to read "=3D 0" as if it were a definitio=
n,=20
but T.C. is quite correct. Adding "=3D 0" to the end of a member function=
=20
declaration does not turn that declaration into a definition (as opposed to=
=20
adding "=3D default" or "=3D delete", which does).
It might even be nice to change the Standard so that every declaration of a=
=20
pure virtual function *was* treated as a definition, but that would break=
=20
conforming code such as
struct A {
virtual const char *foo() =3D 0; // declaration
};
struct B : public A {
const char *foo() override { return "B"; }
const char *bar() { return A::foo(); }
};
const char *A::foo() { return "A"; } // definition
int main() {
puts(B().bar());
}
See=20
http://stackoverflow.com/questions/5481941/c-pure-virtual-function-have-bod=
y=20
for more information.
=E2=80=93Arthur
P.S.: In my experience, "abstract" is typically the adjective for base=20
classes *containing* pure virtual member functions. The member function=20
itself is typically described as *pure virtual*, not "abstract".
--=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.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-propos=
als/.
------=_Part_4213_105468873.1453589668674
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Saturday, January 23, 2016 at 2:26:45 PM UTC-8, Moritz Klammler wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;">Sam Kellett <<a href=3D"javas=
cript:" target=3D"_blank" gdf-obfuscated-mailto=3D"FgwsBZ4AGQAJ" rel=3D"nof=
ollow" onmousedown=3D"this.href=3D'javascript:';return true;" oncli=
ck=3D"this.href=3D'javascript:';return true;">samke...@gmail.com</a=
>> writes:
<br>> On 23 January 2016 at 20:19, T. C. <<a href=3D"javascript:" tar=
get=3D"_blank" gdf-obfuscated-mailto=3D"FgwsBZ4AGQAJ" rel=3D"nofollow" onmo=
usedown=3D"this.href=3D'javascript:';return true;" onclick=3D"this.=
href=3D'javascript:';return true;">rs2...@gmail.com</a>> wrote:
<br>>> On Saturday, January 23, 2016 at 3:06:04 PM UTC-5, Zhihao Yuan=
wrote:
<br>>>>
<br>>>> Because =3D 0, =3D default and =3D delete all define this =
function,
<br>>>> while the current context sensitive keywords virtual and
<br>>>> override qualifies a signature, no matter whether it's=
a
<br>>>> definition. =C2=A0So =3D abstract looks following this tre=
nd.
<br>>>
<br>>> =3D 0 is not a definition, though.
<br>>
<br>> i'm guessing this is saying "this function pointer is nul=
l", aka
<br>> '=3D NULL'
<br>
<br>This is exacty my reading of the construct and I like it quite a lot.
<br></blockquote><div><br></div><div>I can see why Moritz and Sam want to r=
ead "=3D 0" as if it were a definition, but T.C. is quite correct=
.. Adding "=3D 0" to the end of a member function declaration does=
not turn that declaration into a definition (as opposed to adding "=
=3D default" or "=3D delete", which does).</div><div>It migh=
t even be nice to change the Standard so that every declaration of a pure v=
irtual function <i>was</i> treated as a definition, but that would break co=
nforming code such as</div><div><br></div><div class=3D"prettyprint" style=
=3D"background-color: rgb(250, 250, 250); border: 1px solid rgb(187, 187, 1=
87); word-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subp=
rettyprint"><span style=3D"color: #008;" class=3D"styled-by-prettify">struc=
t</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> A </span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span>=
<span style=3D"color: #008;" class=3D"styled-by-prettify">virtual</span><sp=
an 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"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #00=
8;" class=3D"styled-by-prettify">char</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">*</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify">foo</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">()</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span=
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #066;" class=3D"styled-by-prettify">0</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> =C2=A0</span><span style=3D"color: #800;" class=
=3D"styled-by-prettify">// declaration</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">};</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">struct</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> B </span><span style=3D"color: #660;" class=3D"styled-by-prettify">:=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #008;" class=3D"styled-by-prettify">public</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> A </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 =C2=A0 </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">const</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #00=
8;" class=3D"styled-by-prettify">char</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">*</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify">foo</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">()</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">override</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=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: #008;=
" class=3D"styled-by-prettify">return</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"st=
yled-by-prettify">"B"</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">}</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">const</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">char</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">*</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">bar</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">()</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"sty=
led-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">r=
eturn</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> A</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify">foo</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"><br></span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">};</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">const</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">char</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">*</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">A</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">foo</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">()</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </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: #008;" class=3D"styled-by-prettify">return</span><span=
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #080;" class=3D"styled-by-prettify">"A"</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"> =C2=A0</span><span style=3D"color: #800;" class=3D"sty=
led-by-prettify">// definition</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"><br><br></span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">int</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> main</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">()</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 pu=
ts</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">B</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">().</span><span style=3D"c=
olor: #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"><br></span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">}</span></div></code></div><div><br></div><div>See=
=C2=A0<a href=3D"http://stackoverflow.com/questions/5481941/c-pure-virtual-=
function-have-body">http://stackoverflow.com/questions/5481941/c-pure-virtu=
al-function-have-body</a> for more information.</div><div><br></div><div>=
=E2=80=93Arthur</div><div><br></div><div>P.S.: In my experience, "abst=
ract" is typically the adjective for base classes <i>containing</i> pu=
re virtual member functions. The member function itself is typically descri=
bed as <i>pure virtual</i>, not "abstract".</div>
<p></p>
-- <br />
<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+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
------=_Part_4213_105468873.1453589668674--
------=_Part_4212_156391183.1453589668673--
.
Author: Zhihao Yuan <zy@miator.net>
Date: Sat, 23 Jan 2016 18:10:47 -0600
Raw View
On Sat, Jan 23, 2016 at 4:54 PM, Arthur O'Dwyer
<arthur.j.odwyer@gmail.com> wrote:
>
> I can see why Moritz and Sam want to read "= 0" as if it were a definition,
> but T.C. is quite correct. Adding "= 0" to the end of a member function
> declaration does not turn that declaration into a definition (as opposed to
> adding "= default" or "= delete", which does).
Yea, I didn't know :(
But yet again, I'm not seeing "abstract", in either form, fulfilling a
demand that we can't fulfill right now. And that's probably why
this topic is raised every two years without a paper.
--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://bit.ly/blog4bsd
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Magnus Fromreide <magfr@lysator.liu.se>
Date: Sun, 24 Jan 2016 01:57:03 +0100
Raw View
On Sat, Jan 23, 2016 at 08:57:50PM +0000, Sam Kellett wrote:
> On 23 January 2016 at 20:19, T. C. <rs2740@gmail.com> wrote:
>
> >
> >
> > On Saturday, January 23, 2016 at 3:06:04 PM UTC-5, Zhihao Yuan wrote:
> >>
> >>
> >> Because = 0, = default and = delete all define this function,
> >> while the current context sensitive keywords virtual and
> >> override qualifies a signature, no matter whether it's a
> >> definition. So = abstract looks following this trend.
> >>
> >
> > = 0 is not a definition, though.
> >
>
> i'm guessing this is saying "this function pointer is null", aka '= NULL'
Not really, some compilers define NULL to some magic value rather than 0 and
then using = NULL fails. I am not saying this is correct, I just say that it
is the case.
One could argue for = nullptr if one wanted to, but I do not feel it adds
something.
/MF
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 24 Jan 2016 00:18:02 -0800
Raw View
On Saturday 23 January 2016 20:57:50 Sam Kellett wrote:
> On 23 January 2016 at 20:19, T. C. <rs2740@gmail.com> wrote:
> > On Saturday, January 23, 2016 at 3:06:04 PM UTC-5, Zhihao Yuan wrote:
> >> Because = 0, = default and = delete all define this function,
> >> while the current context sensitive keywords virtual and
> >> override qualifies a signature, no matter whether it's a
> >> definition. So = abstract looks following this trend.
> >
> > = 0 is not a definition, though.
>
> i'm guessing this is saying "this function pointer is null", aka '= NULL'
Which it isn't. The function may exist and it's not null in the virtual table
either.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Izzy Coding <matthew.i.greenwood@gmail.com>
Date: Sun, 24 Jan 2016 00:56:25 -0800 (PST)
Raw View
------=_Part_3343_954447618.1453625785925
Content-Type: text/plain; charset=UTF-8
Just wondering....
Would a more precise change be something like the following:
class Foo
{
public:
virtual void Bar() = nullptr;
};
However from my own personal experience I believe the keyword "abstract" to be more of a "when inheriting functionality then forward the pure virtual function onto dependant classes".
To me, usually the pure virtual function is defined when creating interfaces, then the keyword abstract is used for a base class that implements all the generic stuff and then passes the extra functions for defining to any derived class.
For example:
class IFoo
{
public:
virtual void Bar() = nullptr;
virtual void Bar(DataType data) = nullptr;
};
class Foo : public IFoo
{
public:
abstract void Bar();
override void Bar(DataType data) {
// do something with data
}
};
class Derived : public Foo
{
public:
override void Bar() {
auto data = GetCommonDataType();
Bar(data);
}
};
However I could be mistaken in my assumptions.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_3343_954447618.1453625785925--
.
Author: Bo Persson <bop@gmb.dk>
Date: Sun, 24 Jan 2016 12:45:37 +0100
Raw View
On 2016-01-23 23:15, Nevin Liber wrote:
> On 23 January 2016 at 12:59, <reynaldbrassard599@gmail.com
> <mailto:reynaldbrassard599@gmail.com>> wrote:
>
> I think it would be a good idea to add "= abstract" to replace the
> "= 0" syntax for pure virtual functions in a class.
>
>
> #define abstract 0
>
> Done. :-)
>
> Given the committee's limited resources, I'd much rather we work on
> things that we can't express now or that are hard to express now than
> synonyms.
>
> Also, adding a second syntax to do the exact same thing as another
> syntax increases the knowledge needed for code readers to understand C++.
>
+1
Making the language even LARGER is exactly what C++ doesn't need right now.
Bo Persson
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 24 Jan 2016 12:29:30 -0800
Raw View
On Sunday 24 January 2016 00:56:25 Izzy Coding wrote:
> However from my own personal experience I believe the keyword "abstract" to
> be more of a "when inheriting functionality then forward the pure virtual
> function onto dependant classes".
That's not what the standard says.
The standard talks about "Abstract class" [class.abstract], defined as "A class
is abstract if it has at least one pure virtual function." In other words, the
*class* is abstract, not the methods. It would be technically incorrect to
use "abstract" as a keyword for methods.
The only other uses of "abstract" in the standard are "abstract machine" and
"abstract-declarator", the latter of which is inherited from the C standard
and are just the way the grammar names some things.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Matthew Greenwood <matthew.i.greenwood@gmail.com>
Date: Sun, 24 Jan 2016 20:40:08 +0000
Raw View
> The standard talks about "Abstract class" [class.abstract]
I agree this is what the C++ standard says, that is not what I meant. In a lot of other languages that is how things are done. Usually because they have the handy keyword "interface" to define an interface as opposed to the "abstract class" of C++
Either way my main intent was to infer that the "= abstract" proposal should more accurately be "= nullptr" as the idea of assigning 0 as a pointer to a function is just as incorrect as checking a pointer to 0 (NULL).
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 24 Jan 2016 14:40:01 -0800
Raw View
On Sunday 24 January 2016 20:40:08 Matthew Greenwood wrote:
> Either way my main intent was to infer that the "= abstract" proposal should
> more accurately be "= nullptr" as the idea of assigning 0 as a pointer to a
> function is just as incorrect as checking a pointer to 0 (NULL).
The syntax for pure virtual functions has nothing to do with pointers, so I
dispute your claim that "= nullptr" would be more accurate.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Matthew Greenwood <matthew.i.greenwood@gmail.com>
Date: Sun, 24 Jan 2016 23:03:48 +0000
Raw View
Think you will find that any virtual function is technically a pointer to a function.
There fore a pure virtual function could be defined as nullptr instead of 0
> On 24 Jan 2016, at 22:40, Thiago Macieira <thiago@macieira.org> wrote:
>
>> On Sunday 24 January 2016 20:40:08 Matthew Greenwood wrote:
>> Either way my main intent was to infer that the "= abstract" proposal should
>> more accurately be "= nullptr" as the idea of assigning 0 as a pointer to a
>> function is just as incorrect as checking a pointer to 0 (NULL).
>
> The syntax for pure virtual functions has nothing to do with pointers, so I
> dispute your claim that "= nullptr" would be more accurate.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel Open Source Technology Center
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit https://groups.google.com/a/isocpp.org/d/topic/std-proposals/fsybBHRdKjI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 24 Jan 2016 15:47:43 -0800
Raw View
On Sunday 24 January 2016 23:03:48 Matthew Greenwood wrote:
> Think you will find that any virtual function is technically a pointer to a
> function. There fore a pure virtual function could be defined as nullptr
> instead of 0
Except that it isn't. There are no nulls involved anywhere.
The syntax "= 0" does not mean "assign a null pointer in the virtual table".
It's arbitrary.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sun, 24 Jan 2016 17:11:16 -0800 (PST)
Raw View
------=_Part_1770_1098774476.1453684277052
Content-Type: multipart/alternative;
boundary="----=_Part_1771_2118948490.1453684277052"
------=_Part_1771_2118948490.1453684277052
Content-Type: text/plain; charset=UTF-8
On Sunday, January 24, 2016 at 6:03:51 PM UTC-5, Izzy Coding wrote:
>
> Think you will find that any virtual function is technically a pointer to
> a function.
>
That's true of *any* function. It proves nothing.
> There fore a pure virtual function could be defined as nullptr instead of
> 0
>
You can think of it that way if it makes you feel better. But that's not
what it means as far as the standard is concerned.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_1771_2118948490.1453684277052
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Sunday, January 24, 2016 at 6:03:51 PM UTC-5, Izzy Codi=
ng wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Think you will find t=
hat any virtual function is technically a pointer to a function.
<br></blockquote><div><br>That's true of *any* function. It proves noth=
ing.<br>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">There fore=
a pure virtual function could be defined as nullptr instead of 0
<br></blockquote><div><br>You can think of it that way if it makes you feel=
better. But that's not what it means as far as the standard is concern=
ed. <br></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
------=_Part_1771_2118948490.1453684277052--
------=_Part_1770_1098774476.1453684277052--
.
Author: ricky.65@hotmail.com
Date: Tue, 26 Jan 2016 17:08:24 -0800 (PST)
Raw View
------=_Part_442_1811277148.1453856904483
Content-Type: multipart/alternative;
boundary="----=_Part_443_229989181.1453856904483"
------=_Part_443_229989181.1453856904483
Content-Type: text/plain; charset=UTF-8
On Saturday, January 23, 2016 at 6:59:05 PM UTC, reynaldbr...@gmail.com
wrote:
>
> I think it would be a good idea to add "= abstract" to replace the "= 0"
> syntax for pure virtual functions in a class. I believe it would be a good
> addition to the language, as It is more explicit in explaining what you are
> creating. It would make C++ look more unified in syntax as well, to match
> the "= default" and "= deleted" keywords added in C++11.
>
> I am aware that Microsoft Visual Studio currently uses the keyword in C++,
> for example:
>
> class Foo {
> public:
> bar() abstract;
> };
>
> or
>
> class Foo abstract {
> public:
> void bar() abstract;
> };
>
> This works in Microsoft Visual Studio, but is currently not portable to
> other compilers. Also I believe this example looks more consistent
> syntactically:
>
> class Foo {
> public:
> Foo() = default;
> Foo(const Foo&) = delete;
> Foo& operator=(const Foo&) = delete;
> ~Foo() = default;
> virtual void bar() = abstract;
> };
>
> This to me looks more readable than the example below:
>
> class Foo {
> public:
> Foo() = default;
> Foo(const Foo&) = delete;
> Foo& operator=(const Foo&) = delete;
> ~Foo() = default;
> virtual void bar() = 0;
> };
>
> To someone learning the language, the "= abstract" is much more readable
> and explicit in its purpose.
>
Has anybody ever been controversial enough to propose:
class Foo
{
public:
pure_virtual void Bar();
};
For readability and explicitness it would be hard to beat.
P.S I think I just saw a pig flying past my window.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_443_229989181.1453856904483
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<br><br>On Saturday, January 23, 2016 at 6:59:05 PM UTC, reynaldbr...@gmail=
..com wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">I =
think it would be a good idea to add "=3D abstract" to replace th=
e "=3D 0" syntax for pure virtual functions in a class. I believe=
it would be a good addition to the language, as It is more explicit in exp=
laining what you are creating. It would make C++ look more unified in synta=
x as well, to match the "=3D default" and "=3D deleted"=
keywords added in C++11.<div><br></div><div>I am aware that Microsoft Visu=
al Studio currently uses the keyword in C++, for example:</div><div><br></d=
iv><div>class Foo {</div><div>public:</div><div>=C2=A0 =C2=A0 =C2=A0 bar() =
abstract;</div><div>};</div><div><br></div><div>or</div><div><br></div><div=
><div>class Foo abstract {</div><div>public:</div><div>=C2=A0 =C2=A0 =C2=A0=
void bar() abstract;</div><div>};</div></div><div><br></div><div>This work=
s in=C2=A0Microsoft Visual Studio, but is currently not portable to other c=
ompilers. Also I believe this example looks more consistent syntactically:<=
/div><div><br></div><div>class Foo {</div><div>public:</div><div>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0Foo() =3D default;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0Fo=
o(const Foo&) =3D delete;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0Foo&=
operator=3D(const Foo&) =3D delete;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0~Foo() =3D default;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0virtual void ba=
r() =3D abstract;</div><div>};</div><div><br></div><div>This to me looks mo=
re readable than the example below:</div><div><br></div><div><div>class Foo=
{</div><div>public:</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0Foo() =3D default=
;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0Foo(const Foo&) =3D delete;</div=
><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0Foo& operator=3D(const Foo&) =3D d=
elete;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0~Foo() =3D default;</div><div>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0virtual void bar() =3D 0;</div><div>};</div></di=
v><div><br></div><div>To someone learning the language, the "=3D abstr=
act" is much more readable and explicit in its purpose.</div></div></b=
lockquote><div><br></div><div>Has anybody ever been controversial enough to=
propose:</div><div><br></div><div>class Foo<br>{<br>public:<br>=C2=A0 =C2=
=A0 pure_virtual void Bar();<br>};</div><div><br></div><div>For readability=
and explicitness it would be hard to beat.</div><div><br></div><div>P.S I =
think I just saw a pig flying past my window.</div>
<p></p>
-- <br />
<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+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
------=_Part_443_229989181.1453856904483--
------=_Part_442_1811277148.1453856904483--
.
Author: "'Matt Calabrese' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Tue, 26 Jan 2016 17:22:45 -0800
Raw View
--001a113d739aaf7eea052a46a36c
Content-Type: text/plain; charset=UTF-8
On Sat, Jan 23, 2016 at 10:59 AM, <reynaldbrassard599@gmail.com> wrote:
> I think it would be a good idea to add "= abstract" to replace the "= 0"
> syntax for pure virtual functions in a class. I believe it would be a good
> addition to the language, as It is more explicit in explaining what you are
> creating.
>
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 (compared to say using nullptr as
opposed to 0 for a null pointer constant, which actually does solve
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."
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
--001a113d739aaf7eea052a46a36c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On S=
at, Jan 23, 2016 at 10:59 AM, <span dir=3D"ltr"><<a href=3D"mailto:reyn=
aldbrassard599@gmail.com" target=3D"_blank">reynaldbrassard599@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">I th=
ink it would be a good idea to add "=3D abstract" to replace the =
"=3D 0" syntax for pure virtual functions in a class. I believe i=
t would be a good addition to the language, as It is more explicit in expla=
ining what you are creating.</div></blockquote><div><br></div><div>I do not=
see sufficient motivation for this change. 0 in this context is symbolic a=
nd pretty reasonable, in my opinion. Using "abstract" instead of =
0 doesn't solve any practical problems (compared to say using nullptr a=
s opposed to 0 for a null pointer constant, which actually does solve pract=
ical problems). As far as I can tell, what you describe is purely just an a=
dditional syntax for something that can already be done in the language, an=
d 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 h=
ave 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'=
;s a pure virtual function, and I don't see why one would say that eith=
er one of those options is strictly better. The harder part when learning i=
s understanding what a pure virtual function *is* as opposed to the specifi=
c spelling of "pure virtual."</div></div></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
--001a113d739aaf7eea052a46a36c--
.
Author: reynaldbrassard599@gmail.com
Date: Tue, 26 Jan 2016 17:43:54 -0800 (PST)
Raw View
------=_Part_911_929308853.1453859034191
Content-Type: multipart/alternative;
boundary="----=_Part_912_1461947365.1453859034192"
------=_Part_912_1461947365.1453859034192
Content-Type: text/plain; charset=UTF-8
Thanks for all the post guys.
It definitely seems a very low priority, and I can agree there are far more
important factors to focus on. However, from my point of view I still enjoy
having the discussion as opposed to having none.
As for all the feedback, I would agree that abstract would not be the best
choice of wording. I am just used to the MSVC approach, so it seemed
appropriate at the time. From the suggestions posted, if I was to revise
the proposal, I would rather just allow the syntax to use "= pure" or add a
"pure_virtual" declaration in front of the function.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_912_1461947365.1453859034192
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Thanks for all the post guys.<div><br></div><div>It defini=
tely seems a very low priority, and I can agree there are far more importan=
t factors to focus on. However, from my point of view I still enjoy having =
the discussion as opposed to having none.</div><div><br></div><div>As for a=
ll the feedback, I would agree that abstract would not be the best choice o=
f wording. I am just used to the MSVC approach, so it seemed appropriate at=
the time. From the suggestions posted, if I was to revise the proposal, I =
would rather just allow the syntax to use "=3D pure" or add a &qu=
ot;pure_virtual" declaration in front of the function.</div><div>=C2=
=A0</div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
------=_Part_912_1461947365.1453859034192--
------=_Part_911_929308853.1453859034191--
.
Author: David Krauss <potswa@gmail.com>
Date: Wed, 27 Jan 2016 10:20:46 +0800
Raw View
--Apple-Mail=_BCEF7241-9146-40C4-B9D1-8D1133DC4554
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
> On 2016=E2=80=9301=E2=80=9325, at 9:11 AM, Nicol Bolas <jmckesson@gmail.c=
om> wrote:
>=20
> On Sunday, January 24, 2016 at 6:03:51 PM UTC-5, Izzy Coding wrote:
> Think you will find that any virtual function is technically a pointer to=
a function.=20
>=20
> That's true of *any* function. It proves nothing.
> =20
> There fore a pure virtual function could be defined as nullptr instead of=
0=20
>=20
> You can think of it that way if it makes you feel better. But that's not =
what it means as far as the standard is concerned.=20
I recall that D&E mentions that =3D0 was chosen to mimic what a function di=
spatch table typically looks like in C.
However, in C++, a pure vtable entry need not end up =E2=80=9Cset to nullpt=
r,=E2=80=9D since pure-virtual functions may be implemented and reached by =
dynamic dispatch. (I don=E2=80=99t mean by a subclass.)
By the way, on that note, it would be sort of nice to define a pure-virtual=
function at its declaration, and not to have to move it out of the class-s=
pecifier. However, this doesn=E2=80=99t require new syntax. It could be don=
e by removing the pure-specifier production and moving it into virt-specifi=
er. Sort of nice=E2=80=A6 not very interesting.
--=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.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-propos=
als/.
--Apple-Mail=_BCEF7241-9146-40C4-B9D1-8D1133DC4554
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2016=E2=80=9301=
=E2=80=9325, at 9:11 AM, Nicol Bolas <<a href=3D"mailto:jmckesson@gmail.=
com" class=3D"">jmckesson@gmail.com</a>> wrote:</div><br class=3D"Apple-=
interchange-newline"><div class=3D""><div dir=3D"ltr" class=3D"">On Sunday,=
January 24, 2016 at 6:03:51 PM UTC-5, Izzy Coding wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;">Think you will find that any virtual function i=
s technically a pointer to a function.
<br class=3D""></blockquote><div class=3D""><br class=3D"">That's true of *=
any* function. It proves nothing.<br class=3D""> </div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #=
ccc solid;padding-left: 1ex;">There fore a pure virtual function could be d=
efined as nullptr instead of 0
<br class=3D""></blockquote><div class=3D""><br class=3D"">You can think of=
it that way if it makes you feel better. But that's not what it means as f=
ar as the standard is concerned. <br class=3D""></div></div></div></blockqu=
ote><br class=3D""></div><div>I recall that D&E mentions that <font fac=
e=3D"Courier" class=3D"">=3D0</font> was chosen to mimic what a function di=
spatch table typically looks like in C.</div><div><br class=3D""></div><div=
>However, in C++, a pure vtable entry need not end up =E2=80=9Cset to nullp=
tr,=E2=80=9D since pure-virtual functions may be implemented and reached by=
dynamic dispatch. (I don=E2=80=99t mean by a subclass.)</div><br class=3D"=
"><div class=3D"">By the way, on that note, it would be sort of nice to def=
ine a pure-virtual function at its declaration, and not to have to move it =
out of the class-specifier. However, this doesn=E2=80=99t require new synta=
x. It could be done by removing the <i class=3D"">pure-specifier</i> p=
roduction and moving it into <i class=3D"">virt-specifier</i>. Sort of=
nice=E2=80=A6 not very interesting.</div><div class=3D""><br class=3D""></=
div></body></html>
<p></p>
-- <br />
<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+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
--Apple-Mail=_BCEF7241-9146-40C4-B9D1-8D1133DC4554--
.
Author: "'Matt Calabrese' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 27 Jan 2016 10:28:37 -0800
Raw View
--001a113681287be3b6052a54f85b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Tue, Jan 26, 2016 at 6:20 PM, David Krauss <potswa@gmail.com> wrote:
>
> By the way, on that note, it would be sort of nice to define a
> pure-virtual function at its declaration, and not to have to move it out =
of
> the class-specifier. However, this doesn=E2=80=99t require new syntax. It=
could be
> done by removing the *pure-specifier* production and moving it into
> *virt-specifier*. Sort of nice=E2=80=A6 not very interesting.
>
+1
It would be nice to be able to make a pure virtual destructor and define it
in-class. I'd be in favor of a simple proposal for something like this.
--=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.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-propos=
als/.
--001a113681287be3b6052a54f85b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
ue, Jan 26, 2016 at 6:20 PM, David Krauss <span dir=3D"ltr"><<a href=3D"=
mailto:potswa@gmail.com" target=3D"_blank">potswa@gmail.com</a>></span> =
wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex"><div style=3D"word-wrap:break-word"><d=
iv>By the way, on that note, it would be sort of nice to define a pure-virt=
ual function at its declaration, and not to have to move it out of the clas=
s-specifier. However, this doesn=E2=80=99t require new syntax. It could be =
done by removing the <i>pure-specifier</i>=C2=A0production and moving it in=
to=C2=A0<i>virt-specifier</i>. Sort of nice=E2=80=A6 not very interesting.<=
/div></div></blockquote><div><br></div><div>+1</div><div><br></div><div>It =
would be nice to be able to make a pure virtual destructor and define it in=
-class. I'd be in favor of a simple proposal for something like this.</=
div></div></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />
--001a113681287be3b6052a54f85b--
.