Stroustrup's talk on C++0x

eao197 eao197 at intervale.ru
Sun Aug 26 11:15:12 PDT 2007


The first of all -- thanks for your patience!

On Sun, 26 Aug 2007 10:35:47 +0400, Walter Bright  
<newshound1 at digitalmars.com> wrote:

>> Now I see D 2.0 as very different language from D 1.0.
>
> There is more breakage from 1.0 to 2.0, but the changes required are  
> straightforward to find and correct.

Yes, but I mean changes not only in syntax, but in program design.

And see yet another comment on that below.

>>> C++0x's new features are essentially all present in D 1.0.
>>  Yes, but C++ doesn't require programmers to change their language,  
>> tools and libraries. Such change require a lot of time and efforts.  
>> Such effors could be applied to the current projects instead of  
>> switching to D. But, if D could afford something else, something that  
>> completely missing from C++0x (like non-null reference/pointers, some  
>> kind of functional programming (pattern-matching) and so on) than such  
>> switching would be much more attractive.
>
> D 1.0 provides a lot of things completely missing in C++0x:
>
> 1) unit tests
> 2) documentation generation
> 3) modules
> 4) string mixins
> 5) template string & floating point parameters
> 6) compile time function execution
> 7) contract programming
> 8) nested functions
> 9) inner classes
> 10) delegates
> 11) scope statement
> 12) try-finally statement
> 13) static if
> 14) exported templates that are implementable
> 15) compilation speeds that are an order of magnitude faster
> 16) unambiguous template syntax
> 17) easy creation of tools that need to parse D code
> 18) synchronized functions
> 19) template metaprogramming that can be done by mortals
> 20) comprehensive support for array slicing
> 21) inline assembler
> 22) no crazy quilt dependent/non-dependent 2 level lookup rules that  
> major compilers still get wrong and for which I still regularly get  
> 'bug' reports because DMC++ does it according to the Standard
> 23) standard I/O that runs several times faster
> 24) portable sizes for types
> 25) guaranteed initialization
> 26) out function parameters
> 27) imaginary types
> 28) forward referencing of declarations

In November 2006 in a Russian developers forum I noticed [1] the following  
D's advantages:

1) fixed and portable data type sizes (byte, short,...);
2) type properties (like .min, .max, ...);
3) all variables and members have default init values;
4) local variables can't be defined without initial values;
5) type inference in 'auto' declaration and in foreach;
6) unified type casting with 'cast';
7) strict 'typedef' and relaxed 'alias';
8) array have 'length' property and slicing operations;
9) exception in switch if no appropriate 'case';
10) string values in 'case';
11) static constructors and destructors for classes/modules;
12) class invariants;
13) unit tests;
14) static assert;
15) Error as root for all exception classes;
16) scope constructs;
17) nested classes, structs, functions;
18) there aren't macros, all symbol mean exactly what they mean;
19) typesafe variadic functions;
20) floats and strings as template parameters;
21) template parameters specialization.

There are a lot of intersections in our lists ;)

>> I know that you work very hard on D, but D 1.0 took almost 7 years. D  
>> 2.0 started in 2007, so final D 2.0 could be in 2014?
>
> Even if it does take that long, D 1.0 is still far ahead, and is  
> available now.

As I can see from your D conf's presentation D 2.0 is in the begining of  
long road. I've seen from your presentation what will D provide as an  
ultimate answer to C++ and some others languages.

As for me, D 2.0 is a descendant of D (almost as D is descendant of C++).  
So it is better to think that now we have modern language D 1.0 and we  
will have better language D 2.0 in time (may be it is better to chose new  
name for D 2.0, something like D-Bright ;) ).

And now the key factor to make D successful is creating D 1.0 tools,  
libraries, docs and applications. And show how D 1.0 outperform C++ and  
others. If we will made this than D 2.0 will come on the prepared ground.

So it is time for pragmatics to focus on D 1.0 and let language  
enthusiasts play with D 2.0 prototypes.

[1] http://www.rsdn.ru/forum/message/2222569.aspx

-- 
Regards,
Yauheni Akhotnikau



More information about the Digitalmars-d mailing list