Topic: Add Full Suport for OO
Author: thupner@gmail.com
Date: Fri, 17 Apr 2015 06:54:08 -0700 (PDT)
Raw View
------=_Part_703_1988767048.1429278848317
Content-Type: text/plain; charset=UTF-8
Hello
May add the full suport to the C++, like this:
class Main{
public:
static main(){
[...]
}
};
Thanks so Much
Thiago
(Sorry my bad english)
--
---
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 http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_703_1988767048.1429278848317--
.
Author: David Krauss <potswa@gmail.com>
Date: Fri, 17 Apr 2015 22:25:59 +0800
Raw View
--Apple-Mail=_85FBA70C-9A6D-4D6A-A1A3-59AA880CD5BE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
> On 2015=E2=80=9304=E2=80=9317, at 9:54 PM, thupner@gmail.com wrote:
>=20
> class Main{
> public:
> static main(){
> [...]
> }
> };
Why?
Also, how is this more OO than the status quo? As a static member function,=
Main::main can be called without any object.
--=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 http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
--Apple-Mail=_85FBA70C-9A6D-4D6A-A1A3-59AA880CD5BE
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 2015=E2=80=9304=
=E2=80=9317, at 9:54 PM, <a href=3D"mailto:thupner@gmail.com" class=3D"">th=
upner@gmail.com</a> wrote:</div><br class=3D"Apple-interchange-newline"><di=
v class=3D"">class Main{<br class=3D"">public:<br class=3D""> s=
tatic main(){<br class=3D""> [...=
]<br class=3D""> }<br class=3D"">};<br class=3D""></div><=
/blockquote></div><br class=3D""><div class=3D"">Why?</div><div class=3D"">=
<br class=3D""></div><div class=3D"">Also, how is this more OO than the sta=
tus quo? As a <font face=3D"Courier" class=3D"">static</font> member functi=
on, <font face=3D"Courier" class=3D"">Main::main</font> can be called =
without any object.</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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--Apple-Mail=_85FBA70C-9A6D-4D6A-A1A3-59AA880CD5BE--
.
Author: "Francis (Grizzly) Smit" <grizzlysmit@gmail.com>
Date: Sat, 18 Apr 2015 05:44:43 +1000
Raw View
This is a multi-part message in MIME format.
--------------000903020608050509080508
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
On 18/04/15 00:25, David Krauss wrote:
>
>> On 2015=E2=80=9304=E2=80=9317, at 9:54 PM, thupner@gmail.com=20
>> <mailto:thupner@gmail.com> wrote:
>>
>> class Main{
>> public:
>> static main(){
>> [...]
>> }
>> };
>
> Why?
>
> Also, how is this more OO than the status quo? As a static member=20
> function, Main::main can be called without any object.
yup why, if you really want a main class declare one
class Main {
private:
std::string prog;
std::vector<std::string> args;
public:
Main(int argc, char *argv[])
: prog(argv[0]) {
if(argc > 1){
args.insert(args.begin(), &argv[1], argv + argc);
}
};
int run();
};
// then in main()
int main(int argc, char *argv[]){
Main m(argc, argv);
return m.run();
}
// put all your running code in Main::run() or called from there
// and you have all the beauty and none of the pain of changing
// the language note this also gives you a nice std::vector<std::string>=20
args;
// etc which some where asking for, again with no language change
> --=20
>
> ---
> You received this message because you are subscribed to the Google=20
> Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send=20
> an email to std-proposals+unsubscribe@isocpp.org=20
> <mailto:std-proposals+unsubscribe@isocpp.org>.
> To post to this group, send email to std-proposals@isocpp.org=20
> <mailto:std-proposals@isocpp.org>.
> Visit this group at=20
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
--=20
.~. In my life God comes first....
/V\ but Linux is pretty high after that :-D
/( )\ Francis (Grizzly) Smit
^^-^^ http://www.smit.id.au/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P++ L+++$ E--- W++
N W--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ D-
G e++ h+ y?
------END GEEK CODE BLOCK------
http://www.geekcode.com/
--=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 http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
--------------000903020608050509080508
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<br>
<br>
<div class=3D"moz-cite-prefix">On 18/04/15 00:25, David Krauss wrote:<b=
r>
</div>
<blockquote
cite=3D"mid:C5788AAF-F4EE-44A2-8226-E6A99C07DEAE@gmail.com"
type=3D"cite">
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf=
-8">
<br class=3D"">
<div>
<blockquote type=3D"cite" class=3D"">
<div class=3D"">On 2015=E2=80=9304=E2=80=9317, at 9:54 PM, <a
moz-do-not-send=3D"true" href=3D"mailto:thupner@gmail.com"
class=3D"">thupner@gmail.com</a> wrote:</div>
<br class=3D"Apple-interchange-newline">
<div class=3D"">class Main{<br class=3D"">
public:<br class=3D"">
=C2=A0=C2=A0static main(){<br class=3D"">
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0[...]<br class=3D"">
=C2=A0=C2=A0=C2=A0}<br class=3D"">
};<br class=3D"">
</div>
</blockquote>
</div>
<br class=3D"">
<div class=3D"">Why?</div>
<div class=3D""><br class=3D"">
</div>
<div class=3D"">Also, how is this more OO than the status quo? As a
<font class=3D"" face=3D"Courier">static</font> member function,=C2=
=A0<font
class=3D"" face=3D"Courier">Main::main</font> can be called
without any object.</div>
</blockquote>
yup why, if you really want a main class declare one <br>
<br>
=C2=A0=C2=A0=C2=A0 class Main {<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 private:<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 std:=
:string prog;<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 std:=
:vector<std::string> args;<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 public:<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Main=
(int argc, char *argv[])<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : pr=
og(argv[0]) {<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 if(argc > 1){<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 args.insert(args.begin(), &am=
p;argv[1], argv +
argc);<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 }<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 };<b=
r>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 int =
run();<br>
=C2=A0=C2=A0=C2=A0 };<br>
<br>
<br>
// then in main()<br>
<br>
int main(int argc, char *argv[]){<br>
=C2=A0=C2=A0=C2=A0 Main m(argc, argv);<br>
=C2=A0=C2=A0=C2=A0 return m.run();<br>
}<br>
<br>
<br>
// put all your running code in Main::run() or called from there <br>
// and you have all the beauty and none of the pain of changing <br>
// the language note this also gives you a nice
std::vector<std::string> args;<br>
// etc which some where asking for, again with no language change<br>
<br>
<blockquote
cite=3D"mid:C5788AAF-F4EE-44A2-8226-E6A99C07DEAE@gmail.com"
type=3D"cite">
-- <br>
<br>
--- <br>
You received this message because you are subscribed to the Google
Groups "ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it,
send an email to <a moz-do-not-send=3D"true"
href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposals+=
unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a moz-do-not-send=3D"true"
href=3D"mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</=
a>.<br>
Visit this group at <a moz-do-not-send=3D"true"
href=3D"http://groups.google.com/a/isocpp.org/group/std-proposals/"=
>http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br>
</blockquote>
<br>
<div class=3D"moz-signature">-- <br>
<pre> .~. In my life God comes first....
/V\ but Linux is pretty high after that :-D
/( )\ Francis (Grizzly) Smit
^^-^^ <a class=3D"moz-txt-link-freetext" href=3D"http://www.smit.id.au=
/">http://www.smit.id.au/</a>
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P++ L+++$ E--- W++
N W--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ D-
G e++ h+ y?
------END GEEK CODE BLOCK------
<a class=3D"moz-txt-link-freetext" href=3D"http://www.geekcode.com/">http:/=
/www.geekcode.com/</a>
</pre>
</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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--------------000903020608050509080508--
.