Topic: code generation by compiler
Author: maksimpustovoyt@gmail.com
Date: Tue, 29 Apr 2014 22:20:58 -0700 (PDT)
Raw View
------=_Part_3433_17989257.1398835258877
Content-Type: text/plain; charset=UTF-8
Add the preprocessor directive like below:
#generate (int a, int b, const char * name, .) "source.cpp" -> "include.hpp"
Entry point for source.cpp will be, for example:
string gen_main( int a, int b, const char *name, const char * prefix = ""
) {
...
return code_text;
}
, where arguments are defined by signature of #generate macro
method must returns code text which will be copy to "include.hpp" file.
So the workflow will be look like :
1) compiler will scan all file for this generate macro...
1) compile "source.cpp" file
2) run the code
3) write the code_text into target code file, for example "include.hpp"
4) after that this directive will be replaced by #include "include.hpp"
5) compiler start normally ,,
Benefits:
1) This will replace all crazy macro and recursive template
(metaprogramming)
2) Easy to cache compiler error for generated file
3) Easy maintain and debug (after generation it's just source code)
4) Should be very easy to extend gcc...
--
---
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_3433_17989257.1398835258877
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Add the preprocessor directive like below:</div><div>=
#generate (int a, int b, const char * name, .) "source.cpp" -> "include.=
hpp"</div><div><br></div><div>Entry point for source.cpp will be, for examp=
le:</div><div> string gen_main( int a, int b, const char *name, const =
char * prefix =3D "" ) {</div><div> ...</div><div>&=
nbsp; return code_text;</div><div> } </div><div=
>, where arguments are defined by signature of #generate macro</div><div><b=
r></div><div>method must returns code text which will be copy to "include.h=
pp" file.</div><div><br></div><div><br></div><div>So the workflow will be l=
ook like :</div><div>1) compiler will scan all file for this generate macro=
....</div><div>1) compile "source.cpp" file</div><div>2) run the code </div>=
<div>3) write the code_text into target code file, for example "include.hpp=
"</div><div>4) after that this directive will be replaced by #include "incl=
ude.hpp"</div><div>5) compiler start normally ,,</div><div><br></div><div><=
br></div><div>Benefits:</div><div>1) This will replace all crazy macro and =
recursive template (metaprogramming)</div><div>2) Easy to cache compiler er=
ror for generated file</div><div>3) Easy maintain and debug (after gen=
eration it's just source code)</div><div>4) Should be very easy to extend g=
cc...</div><div><br></div><div><br></div><div><br></div><div><br></div></di=
v>
<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 />
------=_Part_3433_17989257.1398835258877--
.
Author: David Krauss <potswa@gmail.com>
Date: Wed, 30 Apr 2014 16:25:30 +0800
Raw View
On 2014-04-30, at 1:20 PM, maksimpustovoyt@gmail.com wrote:
> Benefits:
> 1) This will replace all crazy macro and recursive template (metaprogramming)
We *like* template metaprogramming :v) .
> 2) Easy to cache compiler error for generated file
What would you do with a cache of errors?
> 3) Easy maintain and debug (after generation it's just source code)
Typically you don't maintain and edit the *output* of a compiler.
> 4) Should be very easy to extend gcc...
You can have this sort of scheme without modifying GCC at all, but using only makefiles or the like. Tools like the parser generators Lex and Yacc work this way. But, take great care when designing such a build system.
--
---
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/.
.
Author: gmisocpp@gmail.com
Date: Wed, 30 Apr 2014 05:46:08 -0700 (PDT)
Raw View
------=_Part_1277_33311537.1398861968867
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Actually....
On Wednesday, April 30, 2014 8:25:30 PM UTC+12, David Krauss wrote:
>
>
> On 2014=E2=80=9304=E2=80=9330, at 1:20 PM, maksimp...@gmail.com <javascri=
pt:> wrote:=20
>
> > Benefits:=20
> > 1) This will replace all crazy macro and recursive template=20
> (metaprogramming)=20
>
> We *like* template metaprogramming :v) .=20
>
I *hate* meta programming....=20
>
> > 2) Easy to cache compiler error for generated file=20
>
> What would you do with a cache of errors?=20
>
Watch them relentlessly scroll by on screen.
>
> > 3) Easy maintain and debug (after generation it's just source code)=20
>
> Typically you don=E2=80=99t maintain and edit the *output* of a compiler.=
=20
>
Are you sure? I'm sure I've pasted the error output into the editor and=20
then tried to edit it down.
>
> > 4) Should be very easy to extend gcc=E2=80=A6=20
>
> You can have this sort of scheme without modifying GCC at all, but using=
=20
> only makefiles or the like. Tools like the parser generators Lex and Yacc=
=20
> work this way. But, take great care when designing such a build system.=
=20
>
Yes, use clang, you won't have to modify gcc at all then.
Ah build systems..., almost as much fun as templates.:)
--=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/.
------=_Part_1277_33311537.1398861968867
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Actually....<br><br>On Wednesday, April 30, 2014 8:25:30 P=
M UTC+12, David Krauss wrote:<blockquote class=3D"gmail_quote" style=3D"mar=
gin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204,=
204); border-left-width: 1px; border-left-style: solid;">
<br>On 2014=E2=80=9304=E2=80=9330, at 1:20 PM, <a onmousedown=3D"this.href=
=3D'javascript:';return true;" onclick=3D"this.href=3D'javascript:';return =
true;" href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"Bxy1=
Zqr5agEJ">maksimp...@gmail.com</a> wrote:
<br>
<br>> Benefits:
<br>> 1) This will replace all crazy macro and recursive template (metap=
rogramming)
<br>
<br>We *like* template metaprogramming :v) .
<br></blockquote><div>I *hate* meta programming.... </div><blockquote =
class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex=
; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-lef=
t-style: solid;">
<br>> 2) Easy to cache compiler error for generated file
<br>
<br>What would you do with a cache of errors?
<br></blockquote><div>Watch them relentlessly scroll by on screen.</di=
v><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; pad=
ding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1=
px; border-left-style: solid;">
<br>> 3) Easy maintain and debug (after generation it's just source code=
)
<br>
<br>Typically you don=E2=80=99t maintain and edit the *output* of a compile=
r.
<br></blockquote><div>Are you sure? I'm sure I've pasted the error out=
put into the editor and then tried to edit it down.</div><blockquote class=
=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; bor=
der-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-sty=
le: solid;">
<br>> 4) Should be very easy to extend gcc=E2=80=A6
<br>
<br>You can have this sort of scheme without modifying GCC at all, but usin=
g only makefiles or the like. Tools like the parser generators Lex and Yacc=
work this way. But, take great care when designing such a build system.
<br></blockquote><div>Yes, use clang, you won't have to modify gcc at all t=
hen.</div><div>Ah build systems..., almost as much fun as templates.:)</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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_1277_33311537.1398861968867--
.
Author: =?UTF-8?Q?Klaim_=2D_Jo=C3=ABl_Lamotte?= <mjklaim@gmail.com>
Date: Wed, 30 Apr 2014 14:57:45 +0200
Raw View
--089e0122f14847e83c04f8421845
Content-Type: text/plain; charset=UTF-8
On Wed, Apr 30, 2014 at 2:46 PM, <gmisocpp@gmail.com> wrote:
> I *hate* meta programming....
I suppose it's C++ syntaxe for meta programming that you don't actually
like.
--
---
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/.
--089e0122f14847e83c04f8421845
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On Wed, Apr 30, 2014 at 2:46 PM, <span dir=3D"ltr"><<a href=3D"mailto:g=
misocpp@gmail.com" target=3D"_blank">gmisocpp@gmail.com</a>></span> wrot=
e:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex">
I *hate* meta programming....=C2=A0</blockquote></div><br>I suppose it'=
s C++ syntaxe for meta programming that you =C2=A0don't actually like.<=
/div><div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra"><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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--089e0122f14847e83c04f8421845--
.
Author: "R. Martinho Fernandes" <martinho.fernandes@gmail.com>
Date: Wed, 30 Apr 2014 06:30:39 -0700 (PDT)
Raw View
------=_Part_1581_27803645.1398864639816
Content-Type: text/plain; charset=UTF-8
On Wednesday, April 30, 2014 7:20:58 AM UTC+2, maksimp...@gmail.com wrote:
<snip>
> Benefits:
> 1) This will replace all crazy macro and recursive template
> (metaprogramming)
>
No, it does not. Anyone that has done any minimally useful template
metaprogramming knows that strings just don't cut it. You need *types*. TMP
breathes types and couldn't care less about text. It works at the C++
level, not at the character level.
If you want a text generation system, there are plenty of template engines
(as in "text template", not "C++ template") out there already. Just for a
random example, Microsoft's Visual Studio supports T4 in the IDE, which is
quite nifty. For one cross-platform project of mine I use a simple template
engine that comes in the Python standard library. I use it mostly for
turning large text files into string literals for use in C++; any smarter
code generation is likely to end up needing to know about types and that's
an entirely different abstraction level that requires actual C++ parsing.
--
---
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_1581_27803645.1398864639816
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Wednesday, April 30, 2014 7:20:58 AM UTC+2, maksimp...@=
gmail.com wrote:<div><snip> <br></div><blockquote class=3D"gmail_quot=
e" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;paddin=
g-left: 1ex;"><div dir=3D"ltr">Benefits:<div>1) This will replace all crazy=
macro and recursive template (metaprogramming)</div></div></blockquote><di=
v dir=3D"ltr"><br>No, it does not. Anyone that has done any minimally usefu=
l template metaprogramming knows that strings just don't cut it. You need *=
types*. TMP breathes types and couldn't care less about text. It works at t=
he C++ level, not at the character level.<br>If you want a text generation =
system, there are plenty of template engines (as in "text template", not "C=
++ template") out there already. Just for a random example, Microsoft's Vis=
ual Studio supports T4 in the IDE, which is quite nifty. For one cross-plat=
form project of mine I use a simple template engine that comes in the Pytho=
n standard library. I use it mostly for turning large text files into strin=
g literals for use in C++; any smarter code generation is likely to end up =
needing to know about types and that's an entirely different abstraction le=
vel that requires actual C++ parsing.<br><div><br></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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_1581_27803645.1398864639816--
.
Author: gmisocpp@gmail.com
Date: Wed, 30 Apr 2014 06:33:46 -0700 (PDT)
Raw View
------=_Part_3920_13306.1398864826684
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Thursday, May 1, 2014 12:57:45 AM UTC+12, Klaim - Jo=C3=ABl Lamotte wrot=
e:
>
>
> On Wed, Apr 30, 2014 at 2:46 PM, <gmis...@gmail.com <javascript:>> wrote:
>
>> I *hate* meta programming....=20
>
>
> I suppose it's C++ syntaxe for meta programming that you don't actually=
=20
> like.
>
> Well, I'd be unwell if I did like the syntax I think. I am looking forwar=
d=20
to Concepts.
I believe it they will make me enjoy being a user of existing templates=20
more.
I'm intrigued to know if they or whatever follows them will make me write=
=20
templates more.
Anything that reduces the cache of template errors has got to be good=20
though.
--=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/.
------=_Part_3920_13306.1398864826684
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Thursday, May 1, 2014 12:57:45 AM UTC+12, Klaim=
- Jo=C3=ABl Lamotte wrote:<blockquote class=3D"gmail_quote" style=3D"margi=
n: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 2=
04); border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr"><d=
iv><br><div class=3D"gmail_quote">On Wed, Apr 30, 2014 at 2:46 PM, <span d=
ir=3D"ltr"><<a onmousedown=3D"this.href=3D'javascript:';return true;" on=
click=3D"this.href=3D'javascript:';return true;" href=3D"javascript:" targe=
t=3D"_blank" gdf-obfuscated-mailto=3D"HzQOGElKnTAJ">gmis...@gmail.com</a>&g=
t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin: 0px =
0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); bo=
rder-left-width: 1px; border-left-style: solid;">
I *hate* meta programming.... </blockquote></div><br>I suppose it's C+=
+ syntaxe for meta programming that you don't actually like.</div><di=
v><br></div></div></blockquote><div>Well, I'd be unwell if I did like =
the syntax I think. I am looking forward to Concepts.</div><div>I beli=
eve it they will make me enjoy being a user of existing templates more=
..</div><div>I'm intrigued to know if they or whatever follows them wil=
l make me write templates more.</div><div><br></div><div>Anything that redu=
ces the cache of template errors has got to be good though.</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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_3920_13306.1398864826684--
.
Author: minchul park <summerlight00@gmail.com>
Date: Wed, 30 Apr 2014 23:13:13 +0900
Raw View
--001a11c2cf823059e704f8432631
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Without first-class integration with language-supported reflection, there
is fundamentally no difference between usual code generation technique and
this proposal. If so, I'd use an another language which has much better
text template engine for the purpose, rather than C/C++.
On Wed, Apr 30, 2014 at 10:33 PM, <gmisocpp@gmail.com> wrote:
>
>
> On Thursday, May 1, 2014 12:57:45 AM UTC+12, Klaim - Jo=C3=ABl Lamotte wr=
ote:
>
>>
>> On Wed, Apr 30, 2014 at 2:46 PM, <gmis...@gmail.com> wrote:
>>
>>> I *hate* meta programming....
>>
>>
>> I suppose it's C++ syntaxe for meta programming that you don't actually
>> like.
>>
>> Well, I'd be unwell if I did like the syntax I think. I am looking
> forward to Concepts.
> I believe it they will make me enjoy being a user of existing templates
> more.
> I'm intrigued to know if they or whatever follows them will make me write
> templates more.
>
> Anything that reduces the cache of template errors has got to be good
> 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
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>
--=20
Min-chul Park (summerlight00@gmail.com / http://summerlight.tistory.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/.
--001a11c2cf823059e704f8432631
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Without first-class integration with language-supported re=
flection, there is fundamentally no difference between usual code generatio=
n technique and this proposal. If so, I'd use an another language which=
has much better text template engine for the purpose,=C2=A0rather than C/C=
++.</div>
<div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Wed, Apr 3=
0, 2014 at 10:33 PM, <span dir=3D"ltr"><<a href=3D"mailto:gmisocpp@gmai=
l.com" target=3D"_blank">gmisocpp@gmail.com</a>></span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
solid;padding-left:1ex">
<div dir=3D"ltr"><br><br>On Thursday, May 1, 2014 12:57:45 AM UTC+12, Klaim=
- Jo=C3=ABl Lamotte wrote:<div class=3D""><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(=
204,204,204);border-left-width:1px;border-left-style:solid">
<div dir=3D"ltr"><div><br><div class=3D"gmail_quote">On Wed, Apr 30, 2014 a=
t 2:46 PM, <span dir=3D"ltr"><<a>gmis...@gmail.com</a>></span> wrote=
:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;pa=
dding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;bor=
der-left-style:solid">
I *hate* meta programming....=C2=A0</blockquote></div><br>I suppose it'=
s C++ syntaxe for meta programming that you =C2=A0don't actually like.<=
/div><div><br></div></div></blockquote></div><div>Well, I'd be unwell i=
f I did like=C2=A0the syntax=C2=A0I think. I am looking forward to Concepts=
..</div>
<div>I believe it=C2=A0they will make me enjoy being a user of existing tem=
plates more.</div><div>I'm intrigued to know if=C2=A0they or whatever f=
ollows them will make me write templates more.</div><div><br></div><div>Any=
thing that reduces the cache of template=C2=A0errors=C2=A0has got to be goo=
d though.</div>
</div><div class=3D"HOEnZb"><div class=3D"h5">
<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
<div>Min-chul Park (<a href=3D"mailto:summerlight00@gmail.com" target=3D"_b=
lank">summerlight00@gmail.com</a>=C2=A0/ <a href=3D"http://summerlight.tist=
ory.com/" target=3D"_blank">http://summerlight.tistory.com</a>)</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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--001a11c2cf823059e704f8432631--
.
Author: maksimpustovoyt@gmail.com
Date: Wed, 30 Apr 2014 10:07:18 -0700 (PDT)
Raw View
------=_Part_241_32809783.1398877639371
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Agreed with "Reflection" part. It should be c++. Why do I have to go to=20
another language when it's possible to extend c++ standard?
On Wednesday, April 30, 2014 10:13:13 AM UTC-4, minchul park wrote:
>
> Without first-class integration with language-supported reflection, there=
=20
> is fundamentally no difference between usual code generation technique an=
d=20
> this proposal. If so, I'd use an another language which has much better=
=20
> text template engine for the purpose, rather than C/C++.
>
>
> On Wed, Apr 30, 2014 at 10:33 PM, <gmis...@gmail.com <javascript:>> wrote=
:
>
>>
>>
>> On Thursday, May 1, 2014 12:57:45 AM UTC+12, Klaim - Jo=C3=ABl Lamotte w=
rote:
>>
>>>
>>> On Wed, Apr 30, 2014 at 2:46 PM, <gmis...@gmail.com> wrote:
>>>
>>>> I *hate* meta programming....=20
>>>
>>>
>>> I suppose it's C++ syntaxe for meta programming that you don't actuall=
y=20
>>> like.
>>>
>>> Well, I'd be unwell if I did like the syntax I think. I am looking=20
>> forward to Concepts.
>> I believe it they will make me enjoy being a user of existing templates=
=20
>> more.
>> I'm intrigued to know if they or whatever follows them will make me writ=
e=20
>> templates more.
>>
>> Anything that reduces the cache of template errors has got to be good=20
>> though.
>> =20
>> --=20
>>
>> ---=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> Visit this group at=20
>> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>>
>
>
>
> --=20
> Min-chul Park (summer...@gmail.com <javascript:> /=20
> http://summerlight.tistory.com)
> =20
--=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/.
------=_Part_241_32809783.1398877639371
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Agreed with "Reflection" part. It should be c++. Why do I =
have to go to another language when it's possible to extend c++ standard?<b=
r><br>On Wednesday, April 30, 2014 10:13:13 AM UTC-4, minchul park wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Without first-c=
lass integration with language-supported reflection, there is fundamentally=
no difference between usual code generation technique and this proposal. I=
f so, I'd use an another language which has much better text template engin=
e for the purpose, rather than C/C++.</div>
<div><br><br><div class=3D"gmail_quote">On Wed, Apr 30, 2014 at 10:33 PM, =
<span dir=3D"ltr"><<a href=3D"javascript:" target=3D"_blank" gdf-obfusca=
ted-mailto=3D"Dvl7HenpSvsJ" onmousedown=3D"this.href=3D'javascript:';return=
true;" onclick=3D"this.href=3D'javascript:';return true;">gmis...@gmail.co=
m</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr"><br><br>On Thursday, May 1, 2014 12:57:45 AM UTC+12, Klaim=
- Jo=C3=ABl Lamotte wrote:<div><blockquote class=3D"gmail_quote" style=3D"=
margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204=
);border-left-width:1px;border-left-style:solid">
<div dir=3D"ltr"><div><br><div class=3D"gmail_quote">On Wed, Apr 30, 2014 a=
t 2:46 PM, <span dir=3D"ltr"><<a>gmis...@gmail.com</a>></span> wrote=
:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;pa=
dding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;bor=
der-left-style:solid">
I *hate* meta programming.... </blockquote></div><br>I suppose it's C+=
+ syntaxe for meta programming that you don't actually like.</div><di=
v><br></div></div></blockquote></div><div>Well, I'd be unwell if I did like=
the syntax I think. I am looking forward to Concepts.</div>
<div>I believe it they will make me enjoy being a user of existing tem=
plates more.</div><div>I'm intrigued to know if they or whatever follo=
ws them will make me write templates more.</div><div><br></div><div>Anythin=
g that reduces the cache of template errors has got to be good th=
ough.</div>
</div><div><div>
<p></p>
-- <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 e=
mail to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
Dvl7HenpSvsJ" onmousedown=3D"this.href=3D'javascript:';return true;" onclic=
k=3D"this.href=3D'javascript:';return true;">std-proposal...@<wbr>isocpp.or=
g</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"Dvl7HenpSvsJ" onmousedown=3D"this.href=3D'java=
script:';return true;" onclick=3D"this.href=3D'javascript:';return true;">s=
td-pr...@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank" onmousedown=3D"this.href=3D'http://groups=
..google.com/a/isocpp.org/group/std-proposals/';return true;" onclick=3D"thi=
s.href=3D'http://groups.google.com/a/isocpp.org/group/std-proposals/';retur=
n true;">http://groups.google.com/a/<wbr>isocpp.org/group/std-<wbr>proposal=
s/</a>.<br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
<div>Min-chul Park (<a href=3D"javascript:" target=3D"_blank" gdf-obfuscate=
d-mailto=3D"Dvl7HenpSvsJ" onmousedown=3D"this.href=3D'javascript:';return t=
rue;" onclick=3D"this.href=3D'javascript:';return true;">summer...@gmail.co=
m</a> / <a href=3D"http://summerlight.tistory.com/" target=3D"_blank" =
onmousedown=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fsumm=
erlight.tistory.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFlseIu2ORLHF7RAB3=
t0wnvm2fGzQ';return true;" onclick=3D"this.href=3D'http://www.google.com/ur=
l?q\75http%3A%2F%2Fsummerlight.tistory.com%2F\46sa\75D\46sntz\0751\46usg\75=
AFQjCNFlseIu2ORLHF7RAB3t0wnvm2fGzQ';return true;">http://summerlight.tistor=
y.com</a><wbr>)</div>
</div>
</blockquote></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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_241_32809783.1398877639371--
.
Author: maksimpustovoyt@gmail.com
Date: Wed, 30 Apr 2014 10:05:58 -0700 (PDT)
Raw View
------=_Part_3961_3688975.1398877558635
Content-Type: text/plain; charset=UTF-8
1) I agreed it's not replacing template.
2) There is no need to know about Types. Just take the source file (from
#generate command, build exe, run it, collect text and paste text to file
which will be in #include). After that just run compiler again as usual.
The point is that code generation is build in to compiler and it can be
anything BUT the compiler will be compile the generated code like it was
originally there so you will see the compiler error and you can use debug
this code.
Template meta programming has a lot of restriction for example I cannot
generate class having predefined data_member names..
On Wednesday, April 30, 2014 9:30:39 AM UTC-4, R. Martinho Fernandes wrote:
>
> On Wednesday, April 30, 2014 7:20:58 AM UTC+2, maksimp...@gmail.com wrote:
> <snip>
>
>> Benefits:
>> 1) This will replace all crazy macro and recursive template
>> (metaprogramming)
>>
>
> No, it does not. Anyone that has done any minimally useful template
> metaprogramming knows that strings just don't cut it. You need *types*. TMP
> breathes types and couldn't care less about text. It works at the C++
> level, not at the character level.
> If you want a text generation system, there are plenty of template engines
> (as in "text template", not "C++ template") out there already. Just for a
> random example, Microsoft's Visual Studio supports T4 in the IDE, which is
> quite nifty. For one cross-platform project of mine I use a simple template
> engine that comes in the Python standard library. I use it mostly for
> turning large text files into string literals for use in C++; any smarter
> code generation is likely to end up needing to know about types and that's
> an entirely different abstraction level that requires actual C++ parsing.
>
>
--
---
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_3961_3688975.1398877558635
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">1) I agreed it's not replacing template. <div>2) Ther=
e is no need to know about Types. Just take the source file (from #generate=
command, build exe, run it, collect text and paste text to file which will=
be in #include). After that just run compiler again as usual.<div>The poin=
t is that code generation is build in to compiler and it can be anything BU=
T the compiler will be compile the generated code like it was originally th=
ere so you will see the compiler error and you can use debug this code.</di=
v><div>Template meta programming has a lot of restriction for example I can=
not generate class having predefined data_member names..</div><div><br></di=
v><div><br>On Wednesday, April 30, 2014 9:30:39 AM UTC-4, R. Martinho Ferna=
ndes 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">On=
Wednesday, April 30, 2014 7:20:58 AM UTC+2, <a>maksimp...@gmail.com</a> wr=
ote:<div><snip> <br></div><blockquote class=3D"gmail_quote" style=3D"=
margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><di=
v dir=3D"ltr">Benefits:<div>1) This will replace all crazy macro and recurs=
ive template (metaprogramming)</div></div></blockquote><div dir=3D"ltr"><br=
>No, it does not. Anyone that has done any minimally useful template metapr=
ogramming knows that strings just don't cut it. You need *types*. TMP breat=
hes types and couldn't care less about text. It works at the C++ level, not=
at the character level.<br>If you want a text generation system, there are=
plenty of template engines (as in "text template", not "C++ template") out=
there already. Just for a random example, Microsoft's Visual Studio suppor=
ts T4 in the IDE, which is quite nifty. For one cross-platform project of m=
ine I use a simple template engine that comes in the Python standard librar=
y. I use it mostly for turning large text files into string literals for us=
e in C++; any smarter code generation is likely to end up needing to know a=
bout types and that's an entirely different abstraction level that requires=
actual C++ parsing.<br><div><br></div></div></div></blockquote></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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_3961_3688975.1398877558635--
.