December 29, 2011
What's the stance on using C++11 features in the dmd source code in the future?
December 29, 2011
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?
December 29, 2011
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?
December 31, 2011
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/
December 31, 2011
> http://www.digitalmars.com/ctg/CPP0x-Language-Implementation.html

It supports decltype but not auto??
Range for loop would also be nice to have.
January 02, 2012
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)

January 02, 2012
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
natively supports many C++11 features(or vise-versa), but I wonder if the user-defined literals will ever make into it.


January 02, 2012
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.
January 02, 2012
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.


January 02, 2012
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.

« First   ‹ Prev
1 2
Top | Discussion index | About this forum | D home