www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dmd and C++11

reply "Trass3r" <un known.com> writes:
What's the stance on using C++11 features in the dmd source code 
in the future?
Dec 29 2011
next sibling parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:
 What's the stance on using C++11 features in the dmd source 
 code in the future?

Well, how many C++11 features does DMC support?
Dec 29 2011
next sibling parent Robert Clipsham <robert octarineparrot.com> writes:
On 29/12/2011 16:16, Trass3r wrote:
 On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev wrote:
 On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:
 What's the stance on using C++11 features in the dmd source code in
 the future?

Well, how many C++11 features does DMC support?

*sigh* Totally forgot about that. Can't we finally get rid of that crappy toolchain :'( btw, wasn't there a patch to make dmd compile with VisualStudio cl?

http://www.digitalmars.com/ctg/CPP0x-Language-Implementation.html -- Robert http://octarineparrot.com/
Dec 31 2011
prev sibling parent reply Sean Cavanaugh <WorksOnMyMachine gmail.com> writes:
On 12/29/2011 10:16 AM, Trass3r wrote:
 On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev wrote:
 On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:
 What's the stance on using C++11 features in the dmd source code in
 the future?

Well, how many C++11 features does DMC support?

*sigh* Totally forgot about that. Can't we finally get rid of that crappy toolchain :'( btw, wasn't there a patch to make dmd compile with VisualStudio cl?

Visual Studio support of C++11 is pretty weak (or maybe more accurately 'spotty') in VS2010, and this will be virtually unchanged in the next version. On the plus side what is there (rvalue references, auto) is nice to have. On the downside what is missing is really sad (varaidic templates, range for, the full set of C++11 type traits, the new unicode string types and literals, initializer lists, and a few others I can't remember easily)
Jan 01 2012
next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 1/1/2012 4:30 PM, Mail Mantis wrote:
As for D - it already natively
 supports many C++11 features(or vise-versa), but I wonder if the user-defined
 literals will ever make into it.

With CTFE D has far better than user defined literals.
Jan 01 2012
prev sibling parent =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <xtzgzorex gmail.com> writes:
On 02-01-2012 01:15, Sean Cavanaugh wrote:
 On 12/29/2011 10:16 AM, Trass3r wrote:
 On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev wrote:
 On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:
 What's the stance on using C++11 features in the dmd source code in
 the future?

Well, how many C++11 features does DMC support?

*sigh* Totally forgot about that. Can't we finally get rid of that crappy toolchain :'( btw, wasn't there a patch to make dmd compile with VisualStudio cl?

Visual Studio support of C++11 is pretty weak (or maybe more accurately 'spotty') in VS2010, and this will be virtually unchanged in the next version. On the plus side what is there (rvalue references, auto) is nice to have. On the downside what is missing is really sad (varaidic templates, range for, the full set of C++11 type traits, the new unicode string types and literals, initializer lists, and a few others I can't remember easily)

It has lambdas. That's already a HUGE plus, imo more important than most other features. - Alex
Jan 02 2012
prev sibling next sibling parent "Trass3r" <un known.com> writes:
On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev 
wrote:
 On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:
 What's the stance on using C++11 features in the dmd source 
 code in the future?

Well, how many C++11 features does DMC support?

*sigh* Totally forgot about that. Can't we finally get rid of that crappy toolchain :'( btw, wasn't there a patch to make dmd compile with VisualStudio cl?
Dec 29 2011
prev sibling next sibling parent Trass3r <un known.com> writes:
 http://www.digitalmars.com/ctg/CPP0x-Language-Implementation.html

It supports decltype but not auto?? Range for loop would also be nice to have.
Dec 31 2011
prev sibling next sibling parent Mail Mantis <mail.mantis.88 gmail.com> writes:
--00151748e70c1c74b004b580b186
Content-Type: text/plain; charset=ISO-8859-1

2012/1/2 Sean Cavanaugh <WorksOnMyMachine gmail.com>

 On 12/29/2011 10:16 AM, Trass3r wrote:

 On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev wrote:

 On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:

 What's the stance on using C++11 features in the dmd source code in
 the future?

Well, how many C++11 features does DMC support?

*sigh* Totally forgot about that. Can't we finally get rid of that crappy toolchain :'( btw, wasn't there a patch to make dmd compile with VisualStudio cl?

Visual Studio support of C++11 is pretty weak (or maybe more accurately 'spotty') in VS2010, and this will be virtually unchanged in the next version. On the plus side what is there (rvalue references, auto) is nice to have. On the downside what is missing is really sad (varaidic templates, range for, the full set of C++11 type traits, the new unicode string types and literals, initializer lists, and a few others I can't remember easily) One of the reasons I've switched to g++ lately. As for D - it already

user-defined literals will ever make into it. --00151748e70c1c74b004b580b186 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <br><br><div class=3D"gmail_quote">2012/1/2 Sean Cavanaugh <span dir=3D"ltr= ">&lt;<a href=3D"mailto:WorksOnMyMachine gmail.com">WorksOnMyMachine gmail.= com</a>&gt;</span><br><blockquote class=3D"gmail_quote" style=3D"margin:0 0= 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On 12/29/2011 10:16 AM, Trass3r wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev wrote:<br=

x #ccc solid;padding-left:1ex"> On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> What&#39;s the stance on using C++11 features in the dmd source code in<br> the future?<br> </blockquote> <br> Well, how many C++11 features does DMC support?<br> </blockquote> <br> *sigh*<br> Totally forgot about that. Can&#39;t we finally get rid of that crappy<br> toolchain :&#39;(<br> btw, wasn&#39;t there a patch to make dmd compile with VisualStudio cl?<br> </blockquote> <br> Visual Studio support of C++11 is pretty weak (or maybe more accurately &#3= 9;spotty&#39;) in VS2010, and this will be virtually unchanged in the next = version. =A0On the plus side what is there (rvalue references, auto) is nic= e to have. =A0On the downside what is missing is really sad (varaidic templ= ates, range for, the full set of C++11 type traits, the new unicode string = types and literals, initializer lists, and a few others I can&#39;t remembe= r easily)<br> <br> </blockquote></div>One of the reasons I&#39;ve switched to g++ lately. As f= or D - it already natively supports many C++11 features(or vise-versa), but= I wonder if the user-defined literals will ever make into it. --00151748e70c1c74b004b580b186--
Jan 01 2012
prev sibling next sibling parent Mail Mantis <mail.mantis.88 gmail.com> writes:
--90e6ba5bb945f9d23704b5814d2e
Content-Type: text/plain; charset=ISO-8859-1

2012/1/2 Walter Bright <newshound2 digitalmars.com>

 On 1/1/2012 4:30 PM, Mail Mantis wrote:

 As for D - it already natively
 supports many C++11 features(or vise-versa), but I wonder if the
 user-defined
 literals will ever make into it.

With CTFE D has far better than user defined literals.

If I undestood you correctly... Potentially, yes, But, from syntactical point of view, is there any predefined mean to make something like "a = 2_x + 3_y * 180_deg" expression? I'm asking because the "mixin( foo( import( .... )))" are a bit too unfriendly in terms of error reports they yield. If there are better ways of doing so, I'd definitely want to know it. --90e6ba5bb945f9d23704b5814d2e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div class=3D"gmail_quote">2012/1/2 Walter Bright <span dir=3D"ltr">&lt;<a = href=3D"mailto:newshound2 digitalmars.com">newshound2 digitalmars.com</a>&g= t;</span><br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b= order-left:1px #ccc solid;padding-left:1ex"> <div class=3D"im">On 1/1/2012 4:30 PM, Mail Mantis wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> As for D - it already natively<br> supports many C++11 features(or vise-versa), but I wonder if the user-defin= ed<br> literals will ever make into it.<br> </blockquote> <br></div> With CTFE D has far better than user defined literals.<br></blockquote><div=
=A0</div><div>If I undestood you correctly...</div><div>Potentially, yes, =

omething like &quot;a =3D 2_x + 3_y * 180_deg&quot; expression? I&#39;m ask= ing because the &quot;mixin( foo( import( .... )))&quot; are a bit too unfr= iendly in terms of error reports they yield. If there are better ways of do= ing so, I&#39;d definitely want to know it.</div> </div> --90e6ba5bb945f9d23704b5814d2e--
Jan 01 2012
prev sibling next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Monday, 2 January 2012 at 01:14:43 UTC, Mail Mantis wrote:
 If I undestood you correctly...
 Potentially, yes, But, from syntactical point of view, is there 
 any [...]

http://drdobbs.com/blogs/tools/229401068 In std.conv, the octal template is one example: int a = octal!755; Another thing I like doing is using simple structs. For instance: struct Html { string src; } Usage: Html myhtml = Html("<b>some text</b>"); Which is really easy too.
Jan 01 2012
prev sibling next sibling parent Mail Mantis <mail.mantis.88 gmail.com> writes:
--002354477e36aaed1904b589a49b
Content-Type: text/plain; charset=ISO-8859-1

2012/1/2 Adam D. Ruppe <destructionator gmail.com>

 On Monday, 2 January 2012 at 01:14:43 UTC, Mail Mantis wrote:

 If I undestood you correctly...
 Potentially, yes, But, from syntactical point of view, is there any [...]

http://drdobbs.com/blogs/**tools/229401068<http://drdobbs.com/blogs/tools/229401068> In std.conv, the octal template is one example: int a = octal!755;

And the above example may be rewritten as: a = x!2 + y!3 * deg!180; Thank you, totally forgot about this --002354477e36aaed1904b589a49b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div class=3D"gmail_quote">2012/1/2 Adam D. Ruppe <span dir=3D"ltr">&lt;<a = href=3D"mailto:destructionator gmail.com" target=3D"_blank">destructionator= gmail.com</a>&gt;</span><br><blockquote class=3D"gmail_quote" style=3D"mar= gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div>On Monday, 2 January 2012 at 01:14:43 UTC, Mail Mantis wrote:<br> </div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l= eft:1px #ccc solid;padding-left:1ex"><div> If I undestood you correctly...<br></div> Potentially, yes, But, from syntactical point of view, is there any [...]<b= r> </blockquote> <br> <a href=3D"http://drdobbs.com/blogs/tools/229401068" target=3D"_blank">http= ://drdobbs.com/blogs/<u></u>tools/229401068</a><br> <br> In std.conv, the octal template is one example:<br> <br> int a =3D octal!755;<br></blockquote><div><br></div><div>And the above exam= ple may be rewritten as:</div><div>a =3D x!2 + y!3 * deg!180;</div><div>Tha= nk you, totally forgot about this=A0</div></div> --002354477e36aaed1904b589a49b--
Jan 02 2012
prev sibling parent Trass3r <un known.com> writes:
Did a quick test, dmd compiles fine with -gnu++0x -fpermissive (gcc 4.6.1)
Can anyone try with dmc?
Jan 04 2012