D - more or less power than C++?
Anders F Björklund
afb at algonet.se
Fri Mar 3 16:06:12 PST 2006
Walter Bright wrote:
> I see this often and am a bit perplexed by it. What power do you feel is
> missing?
>
> And what about the missing power in C++ - inline assembler, nested
> functions, contract programming, unit testing, automatic documentation
> generation, static if, delegates, dynamic closures, inner classes, modules,
> garbage collection, scope guard?
>
> What does D have to do to have more power than C++?
Some features that C++ has on the Mac OS X platform are:
- C programming model for SIMD / vectorization (Vec / SSE)
- 64-bit code generation (well, not for x86 yet but anyway)
- access to "Carbon" system headers, loads of old C macros
- the ability to co-exist with "Cocoa", using Objective-C++
Automatic documentation generation and inline assembler
are covered by Doxygen and by GCC, so I won't count those.
(C/C++ has inline assembler for PowerPC, while D doesn't.
I still prefer the output from Doxygen, while Ddoc matures)
Things that *are* possible in D, but needs some more work:
GDB - debugger support for code mangling and data structures
Xcode - full integration with system developer tools and IDE
So besides that templates are broken on "old" Mac OS X 10.3,
it works mostly the same as what C/C++ does on the platform.
(Some of the features requires patching both of GCC and GDB)
One thing that I *do* miss are the array literals, though.
The rest are more of implementation issues, not language.
As a language, I do like D a lot more than what I do C++...
--anders
More information about the Digitalmars-d
mailing list