Stroustrup's talk on C++0x

Walter Bright newshound1 at digitalmars.com
Sat Aug 25 23:35:47 PDT 2007


eao197 wrote:
> AFAIK, C++0x doesn't break compatibility with C++98. So if I teach 
> students C++98 now they could use C++0x. Moreover they could use in 
> C++0x all their C++98 code.

It's not a perfect superset, but the breakage is very small.

> 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.

>>> To outperform C++ in 2009-2010 D must have full strength now and must 
>>> be stable during some years to proof that strength in some killer 
>>> applications.
>>
>> 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

> 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.

To see how much more productive D is, compare Kirk McDonald's amazing 
PyD http://pyd.dsource.org/dconf2007/presentation.html with Boost Python.

To see what D can do that C++ can't touch, see Don Clugston's incredible 
optimal code generator at http://s3.amazonaws.com/dconf2007/Don.ppt



More information about the Digitalmars-d mailing list