Topic: Virtual class


Author: =?UTF-8?B?0JTQtdC90LjRgSDQmtC+0YLQvtCy?= <redradist@gmail.com>
Date: Sun, 7 Aug 2016 12:29:31 -0700 (PDT)
Raw View
------=_Part_233_747583368.1470598171896
Content-Type: multipart/alternative;
 boundary="----=_Part_234_890325255.1470598171897"

------=_Part_234_890325255.1470598171897
Content-Type: text/plain; charset=UTF-8

My propousal is to add posibillity for marking class like virtual on
definition.
Like below:

*virtual class MyClass {*
/*
  Implementation.
*/
*};*

That will allow in derived class not forget to write this keyword, because
if you forget in one derived class put this parameter:

*class Object {*
/*
  Implementation.
*/


*};class Human : public virtual *
*Object {*/*
  Implementation.
*/


*};**class Animal : public *
*Object {*/*
  Implementation.
*/

*};*


*class Alien : public Human , public Animal {*



*/*  Implementation.*/};*


In this example we would have two derived object of typ*e **Object,*
because we forgot keyword 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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/35fba11c-bb03-48d5-90e4-25a952ddca2f%40isocpp.org.

------=_Part_234_890325255.1470598171897
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">My propousal is to add posibillity for marking class like =
virtual on definition.<br>Like below:<br><br><b>virtual class MyClass {</b>=
<br>/*<br>=C2=A0 Implementation.<br>*/<br><b>};</b><br><br>That will allow =
in derived class not forget to write this keyword, because if you forget in=
 one derived class put this parameter:<br><br><b>class Object {</b><br>/*<b=
r>=C2=A0 Implementation.<br>*/<br><b>};<br><br>class Human : public virtual=
 </b><b>Object {<br></b>/*<br>=C2=A0 Implementation.<br>*/<b><br>};<br><br>=
</b><b>class Animal : public </b><b>Object {<br></b>/*<br>=C2=A0 Implementa=
tion.<br>*/<b><br>};<br></b><br><pre><b><span class=3D"k"></span></b><b><sp=
an class=3D"nc"><b>class Alien : public Human </b></span>, <span class=3D"n=
c">public </span>Animal {<br></b><b>/*<br>=C2=A0 Implementation.<br>*/<b><b=
r></b>};<br></b></pre><br>In this example we would have two derived object =
of typ<b>e </b><b><b>Object</b>,</b> because we forgot keyword virtual.<br>=
<br><b> </b></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/35fba11c-bb03-48d5-90e4-25a952ddca2f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/35fba11c-bb03-48d5-90e4-25a952ddca2f=
%40isocpp.org</a>.<br />

------=_Part_234_890325255.1470598171897--

------=_Part_233_747583368.1470598171896--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sun, 7 Aug 2016 14:59:50 -0700 (PDT)
Raw View
------=_Part_1397_626195619.1470607190774
Content-Type: multipart/alternative;
 boundary="----=_Part_1398_1976752216.1470607190774"

------=_Part_1398_1976752216.1470607190774
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Sunday, August 7, 2016 at 3:29:32 PM UTC-4, =D0=94=D0=B5=D0=BD=D0=B8=D1=
=81 =D0=9A=D0=BE=D1=82=D0=BE=D0=B2 wrote:
>
> My propousal is to add posibillity for marking class like virtual on=20
> definition.
>

Your proposal assumes that the only reasonable way to inherit from this=20
class is virtually. How reasonable is it for someone who is writing the=20
class to make that determination?

--=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/1fc644c3-7b7c-4e35-8cef-09ed19db0995%40isocpp.or=
g.

------=_Part_1398_1976752216.1470607190774
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sunday, August 7, 2016 at 3:29:32 PM UTC-4, =D0=94=D0=
=B5=D0=BD=D0=B8=D1=81 =D0=9A=D0=BE=D1=82=D0=BE=D0=B2 wrote:<blockquote clas=
s=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #c=
cc solid;padding-left: 1ex;"><div dir=3D"ltr">My propousal is to add posibi=
llity for marking class like virtual on definition.<br></div></blockquote><=
div dir=3D"ltr"><br>Your proposal assumes that the only reasonable way to i=
nherit from this class is virtually. How reasonable is it for someone who i=
s writing the class to make that determination?<br><b> </b></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/1fc644c3-7b7c-4e35-8cef-09ed19db0995%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/1fc644c3-7b7c-4e35-8cef-09ed19db0995=
%40isocpp.org</a>.<br />

------=_Part_1398_1976752216.1470607190774--

------=_Part_1397_626195619.1470607190774--

.


Author: =?UTF-8?B?0JTQtdC90LjRgSDQmtC+0YLQvtCy?= <redradist@gmail.com>
Date: Sun, 7 Aug 2016 15:06:21 -0700 (PDT)
Raw View
------=_Part_99_570865320.1470607581541
Content-Type: multipart/alternative;
 boundary="----=_Part_100_1394003022.1470607581542"

------=_Part_100_1394003022.1470607581542
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

=D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 8 =D0=
=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2016 =D0=B3., 0:59:51 UTC+3 =D0=BF=
=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Nicol Bo=
las=20
=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> On Sunday, August 7, 2016 at 3:29:32 PM UTC-4, =D0=94=D0=B5=D0=BD=D0=B8=
=D1=81 =D0=9A=D0=BE=D1=82=D0=BE=D0=B2 wrote:
>>
>> My propousal is to add posibillity for marking class like virtual on=20
>> definition.
>>
>
> Your proposal assumes that the only reasonable way to inherit from this=
=20
> class is virtually. How reasonable is it for someone who is writing the=
=20
> class to make that determination?
>

> Your proposal assumes that the only reasonable way to inherit from this=
=20
class is virtually. How reasonable is it for someone who is writing the=20
class to make that=20
> determination?=20

*No*, I do not think that it is one reasonable way to inherit. My proposal=
=20
just gives a developer a choice either make his class virtual by default or=
=20
not.

--=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/7fff4143-8097-47ef-b863-9cb9b9b2209a%40isocpp.or=
g.

------=_Part_100_1394003022.1470607581542
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">=D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=
=B8=D0=BA, 8 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2016 =D0=B3., 0:59:=
51 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=
=D1=8C Nicol Bolas =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<blockquote c=
lass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px=
 #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">On Sunday, August 7, 2016 =
at 3:29:32 PM UTC-4, =D0=94=D0=B5=D0=BD=D0=B8=D1=81 =D0=9A=D0=BE=D1=82=D0=
=BE=D0=B2 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">My=
 propousal is to add posibillity for marking class like virtual on definiti=
on.<br></div></blockquote><div dir=3D"ltr"><br>Your proposal assumes that t=
he only reasonable way to inherit from this class is virtually. How reasona=
ble is it for someone who is writing the class to make that determination?<=
br></div></div></blockquote><div><br>&gt; Your proposal assumes that the on=
ly reasonable way to inherit from this=20
class is virtually. How reasonable is it for someone who is writing the=20
class to make that <br>&gt; determination? <br><br><b>No</b>, I do not thin=
k that it is one reasonable way to inherit. My proposal just gives a develo=
per a choice either make his class virtual by default or not.<br></div></di=
v>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/7fff4143-8097-47ef-b863-9cb9b9b2209a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7fff4143-8097-47ef-b863-9cb9b9b2209a=
%40isocpp.org</a>.<br />

------=_Part_100_1394003022.1470607581542--

------=_Part_99_570865320.1470607581541--

.


Author: =?UTF-8?B?0JTQtdC90LjRgSDQmtC+0YLQvtCy?= <redradist@gmail.com>
Date: Sun, 7 Aug 2016 15:08:26 -0700 (PDT)
Raw View
------=_Part_1496_123000903.1470607706226
Content-Type: multipart/alternative;
 boundary="----=_Part_1497_401939141.1470607706227"

------=_Part_1497_401939141.1470607706227
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

=D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 8 =D0=
=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2016 =D0=B3., 0:59:51 UTC+3 =D0=BF=
=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Nicol Bo=
las=20
=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> On Sunday, August 7, 2016 at 3:29:32 PM UTC-4, =D0=94=D0=B5=D0=BD=D0=B8=
=D1=81 =D0=9A=D0=BE=D1=82=D0=BE=D0=B2 wrote:
>>
>> My propousal is to add posibillity for marking class like virtual on=20
>> definition.
>>
>
> Your proposal assumes that the only reasonable way to inherit from this=
=20
> class is virtually. How reasonable is it for someone who is writing the=
=20
> class to make that determination?
>

In some cases multiple non-virtual inheritance significant more useful.

--=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/4ed42d9e-53e1-4704-9ec9-886d46406ce7%40isocpp.or=
g.

------=_Part_1497_401939141.1470607706227
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">=D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=
=B8=D0=BA, 8 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2016 =D0=B3., 0:59:=
51 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=
=D1=8C Nicol Bolas =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<blockquote c=
lass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px=
 #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">On Sunday, August 7, 2016 =
at 3:29:32 PM UTC-4, =D0=94=D0=B5=D0=BD=D0=B8=D1=81 =D0=9A=D0=BE=D1=82=D0=
=BE=D0=B2 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">My=
 propousal is to add posibillity for marking class like virtual on definiti=
on.<br></div></blockquote><div dir=3D"ltr"><br>Your proposal assumes that t=
he only reasonable way to inherit from this class is virtually. How reasona=
ble is it for someone who is writing the class to make that determination?<=
br></div></div></blockquote><div><br>In some cases multiple non-virtual inh=
eritance significant more useful.<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/4ed42d9e-53e1-4704-9ec9-886d46406ce7%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4ed42d9e-53e1-4704-9ec9-886d46406ce7=
%40isocpp.org</a>.<br />

------=_Part_1497_401939141.1470607706227--

------=_Part_1496_123000903.1470607706226--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sun, 7 Aug 2016 15:11:13 -0700 (PDT)
Raw View
------=_Part_3771_2095539825.1470607873812
Content-Type: multipart/alternative;
 boundary="----=_Part_3772_385606627.1470607873812"

------=_Part_3772_385606627.1470607873812
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Sunday, August 7, 2016 at 6:06:22 PM UTC-4, =D0=94=D0=B5=D0=BD=D0=B8=D1=
=81 =D0=9A=D0=BE=D1=82=D0=BE=D0=B2 wrote:
>
> =D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 8 =D0=
=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2016 =D0=B3., 0:59:51 UTC+3 =D0=BF=
=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Nicol Bo=
las=20
> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>>
>> On Sunday, August 7, 2016 at 3:29:32 PM UTC-4, =D0=94=D0=B5=D0=BD=D0=B8=
=D1=81 =D0=9A=D0=BE=D1=82=D0=BE=D0=B2 wrote:
>>>
>>> My propousal is to add posibillity for marking class like virtual on=20
>>> definition.
>>>
>>
>> Your proposal assumes that the only reasonable way to inherit from this=
=20
>> class is virtually. How reasonable is it for someone who is writing the=
=20
>> class to make that determination?
>>
>
> > Your proposal assumes that the only reasonable way to inherit from this=
=20
> class is virtually. How reasonable is it for someone who is writing the=
=20
> class to make that=20
> > determination?=20
>
> *No*, I do not think that it is one reasonable way to inherit. My=20
> proposal just gives a developer a choice either make his class virtual by=
=20
> default or not.
>

But we don't have syntax to say that you *don't* want to virtually inherit.=
=20
By changing the default, it is impossible to non-virtually inherit from=20
such a class. Do you propose adding the ability to explicitly declare that=
=20
you want non-virtual inheritance? What would be the syntax for that?=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/cd664c24-e160-4e88-bc63-6a4c087aa3d7%40isocpp.or=
g.

------=_Part_3772_385606627.1470607873812
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Sunday, August 7, 2016 at 6:06:22 PM UTC-4, =D0=
=94=D0=B5=D0=BD=D0=B8=D1=81 =D0=9A=D0=BE=D1=82=D0=BE=D0=B2 wrote:<blockquot=
e class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: =
1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">=D0=BF=D0=BE=D0=BD=D0=
=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 8 =D0=B0=D0=B2=D0=B3=D1=83=
=D1=81=D1=82=D0=B0 2016 =D0=B3., 0:59:51 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=
=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Nicol Bolas =D0=BD=D0=B0=D0=
=BF=D0=B8=D1=81=D0=B0=D0=BB:<blockquote class=3D"gmail_quote" style=3D"marg=
in:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div di=
r=3D"ltr">On Sunday, August 7, 2016 at 3:29:32 PM UTC-4, =D0=94=D0=B5=D0=BD=
=D0=B8=D1=81 =D0=9A=D0=BE=D1=82=D0=BE=D0=B2 wrote:<blockquote class=3D"gmai=
l_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;pad=
ding-left:1ex"><div dir=3D"ltr">My propousal is to add posibillity for mark=
ing class like virtual on definition.<br></div></blockquote><div dir=3D"ltr=
"><br>Your proposal assumes that the only reasonable way to inherit from th=
is class is virtually. How reasonable is it for someone who is writing the =
class to make that determination?<br></div></div></blockquote><div><br>&gt;=
 Your proposal assumes that the only reasonable way to inherit from this=20
class is virtually. How reasonable is it for someone who is writing the=20
class to make that <br>&gt; determination? <br><br><b>No</b>, I do not thin=
k that it is one reasonable way to inherit. My proposal just gives a develo=
per a choice either make his class virtual by default or not.<br></div></di=
v></blockquote><div><br>But we don&#39;t have syntax to say that you <i>don=
&#39;t</i> want to virtually inherit. By changing the default, it is imposs=
ible to non-virtually inherit from such a class. Do you propose adding the =
ability to explicitly declare that you want non-virtual inheritance? What w=
ould be the syntax for that? <br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/cd664c24-e160-4e88-bc63-6a4c087aa3d7%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/cd664c24-e160-4e88-bc63-6a4c087aa3d7=
%40isocpp.org</a>.<br />

------=_Part_3772_385606627.1470607873812--

------=_Part_3771_2095539825.1470607873812--

.


Author: Sean Middleditch <sean.middleditch@gmail.com>
Date: Mon, 8 Aug 2016 14:57:46 -0700 (PDT)
Raw View
------=_Part_427_1885403670.1470693467046
Content-Type: multipart/alternative;
 boundary="----=_Part_428_1734429725.1470693467046"

------=_Part_428_1734429725.1470693467046
Content-Type: text/plain; charset=UTF-8

On Sunday, August 7, 2016 at 3:11:14 PM UTC-7, Nicol Bolas wrote:
>
>
> But we don't have syntax to say that you *don't* want to virtually
> inherit. By changing the default, it is impossible to non-virtually inherit
> from such a class. Do you propose adding the ability to explicitly declare
> that you want non-virtual inheritance? What would be the syntax for that?
>

`static` obviously.

Then of course we sometimes want to make a base class immutable to the
child, so we can allow use of `const` as well. Also, while we're at it,
extension classes that are automatically the base class of every other
class would be neat and we'd get the leg-up on C# for once and we can use
`auto` for that. Let's not forget the high importance of singletons so
`register` to indicate that instances should notify the singleton manager
of their creation would be spiffy. And I can't count how many times I've
wanted to have a class inherit from two classes that should share storage,
so `union` would be a really nice feather in our cap.

  register auto class foo : public static const bar union baz {

So beautiful. It's like the visual poetry of a sunset over the ocean. ...
though that might just be my syntax highlighter.

--
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/766c6eab-33dd-4eaf-a8cb-4ceafd8e275b%40isocpp.org.

------=_Part_428_1734429725.1470693467046
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sunday, August 7, 2016 at 3:11:14 PM UTC-7, Nicol Bolas=
 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"><div><=
br>But we don&#39;t have syntax to say that you <i>don&#39;t</i> want to vi=
rtually inherit. By changing the default, it is impossible to non-virtually=
 inherit from such a class. Do you propose adding the ability to explicitly=
 declare that you want non-virtual inheritance? What would be the syntax fo=
r that? <br></div></div></blockquote><div><br></div><div>`static` obviously=
..</div><div><br></div><div>Then of course we sometimes want to make a base =
class immutable to the child, so we can allow use of `const` as well. Also,=
 while we&#39;re at it, extension classes that are automatically the base c=
lass of every other class would be neat and we&#39;d get the leg-up on C# f=
or once and we can use `auto` for that. Let&#39;s not forget the high impor=
tance of singletons so `register` to indicate that instances should notify =
the singleton manager of their creation would be spiffy. And I can&#39;t co=
unt how many times I&#39;ve wanted to have a class inherit from two classes=
 that should share storage, so `union` would be a really nice feather in ou=
r cap.</div><div><br></div><div>=C2=A0 register auto class foo : public sta=
tic const bar union baz {</div><div><br></div><div>So beautiful. It&#39;s l=
ike the visual poetry of a sunset over the ocean. ... though that might jus=
t be my syntax highlighter.</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/766c6eab-33dd-4eaf-a8cb-4ceafd8e275b%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/766c6eab-33dd-4eaf-a8cb-4ceafd8e275b=
%40isocpp.org</a>.<br />

------=_Part_428_1734429725.1470693467046--

------=_Part_427_1885403670.1470693467046--

.


Author: szollosi.lorand@gmail.com
Date: Tue, 9 Aug 2016 14:18:07 -0700 (PDT)
Raw View
------=_Part_916_1230066918.1470777488010
Content-Type: multipart/alternative;
 boundary="----=_Part_917_915730764.1470777488010"

------=_Part_917_915730764.1470777488010
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi,

How is it different from:
- Renaming MyClass to MyClassImpl (and hiding it)
- class MyClass : public virtual MyClassImpl
- which then inherits constructors
?

Thanks,
-lorro

2016. augusztus 7., vas=C3=A1rnap 21:29:32 UTC+2 id=C5=91pontban =D0=94=D0=
=B5=D0=BD=D0=B8=D1=81 =D0=9A=D0=BE=D1=82=D0=BE=D0=B2 a=20
k=C3=B6vetkez=C5=91t =C3=ADrta:
>
> My propousal is to add posibillity for marking class like virtual on=20
> definition.
> Like below:
>
> *virtual class MyClass {*
> /*
>   Implementation.
> */
> *};*
>
> That will allow in derived class not forget to write this keyword, becaus=
e=20
> if you forget in one derived class put this parameter:
>
> *class Object {*
> /*
>   Implementation.
> */
>
>
> *};class Human : public virtual *
> *Object {*/*
>   Implementation.
> */
>
>
> *};**class Animal : public *
> *Object {*/*
>   Implementation.
> */
>
> *};*
>
>
> *class Alien : public Human , public Animal {*
>
>
>
> */*  Implementation.*/};*
>
>
> In this example we would have two derived object of typ*e **Object,*=20
> because we forgot keyword virtual.
>
>

--=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/ee99bdb0-e1cd-474c-bc79-794ed0188ef8%40isocpp.or=
g.

------=_Part_917_915730764.1470777488010
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<br><br>How is it different from:<br>- Renaming MyClass=
 to MyClassImpl (and hiding it)<br>- class MyClass : public virtual MyClass=
Impl<br>- which then inherits constructors<br>?<br><br>Thanks,<br>-lorro<br=
><br>2016. augusztus 7., vas=C3=A1rnap 21:29:32 UTC+2 id=C5=91pontban =D0=
=94=D0=B5=D0=BD=D0=B8=D1=81 =D0=9A=D0=BE=D1=82=D0=BE=D0=B2 a k=C3=B6vetkez=
=C5=91t =C3=ADrta:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"=
ltr">My propousal is to add posibillity for marking class like virtual on d=
efinition.<br>Like below:<br><br><b>virtual class MyClass {</b><br>/*<br>=
=C2=A0 Implementation.<br>*/<br><b>};</b><br><br>That will allow in derived=
 class not forget to write this keyword, because if you forget in one deriv=
ed class put this parameter:<br><br><b>class Object {</b><br>/*<br>=C2=A0 I=
mplementation.<br>*/<br><b>};<br><br>class Human : public virtual </b><b>Ob=
ject {<br></b>/*<br>=C2=A0 Implementation.<br>*/<b><br>};<br><br></b><b>cla=
ss Animal : public </b><b>Object {<br></b>/*<br>=C2=A0 Implementation.<br>*=
/<b><br>};<br></b><br><pre><b><span></span></b><b><span><b>class Alien : pu=
blic Human </b></span>, <span>public </span>Animal {<br></b><b>/*<br>=C2=A0=
 Implementation.<br>*/<b><br></b>};<br></b></pre><br>In this example we wou=
ld have two derived object of typ<b>e </b><b><b>Object</b>,</b> because we =
forgot keyword virtual.<br><br><b> </b></div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/ee99bdb0-e1cd-474c-bc79-794ed0188ef8%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/ee99bdb0-e1cd-474c-bc79-794ed0188ef8=
%40isocpp.org</a>.<br />

------=_Part_917_915730764.1470777488010--

------=_Part_916_1230066918.1470777488010--

.