D vs other languages are given
D Rough comparison of other frequently mentioned languages in various characteristics. Although there are also many features in the standard libraries of each language, this form is only considered in the characteristics of the built-in core. We only consider the official standard characteristics, regardless of the proposed characteristics, the characteristics of the beta or non-standard expansion characteristics. Moreover, as in all other languages, what features are mentioned, ignored what features and I have biased the interpretation of these features.
Characteristics of DC C C # Java garbage collection function Yes No No Yes Yes function entrusted Yes No No Yes No function overloading Yes No Yes Yes Yes spread (out) function parameters Yes Yes Yes Yes No nested function Yes No No No No text function the amount of dynamic Yes No No No No No No No closure No array Yes lightweight array Yes Yes Yes No No variable length arrays Yes No No No No No No No bit array No built Yes Yes No No Yes Yes string array slice Yes No no no no no no no no yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes YES Multi-induction No No yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes) intra YES YES YES Internal (Adapter) NO No No No Yes Coordination Returning YES No Yes No No No No No Yes NO Performance Inline Deployment YES YES NO NO Direct Access Hardware Yes Yes No NO Lightweight Objects YES YES YES NO Show Memory Allocation Control YES Yes Yes No No independent virtual machines Yes Yes Yes No No directly generate native code Yes Yes Yes No No generic programming templates Yes No Yes No No mixed Yes No No No No typeof Yes No No Yes No foreach Yes No No Yes No constraints YES NO NO NO Reliability Contract programming YES NO No No NO unit Test Yes No No No N o NO yes yes yes yes yes yes yes yes no no yes yes yes yes no no yes yes yes yes no no yes yes yes yes no no yes yes yes yes yes yes yes thread synchronization YES NO NO YES YES Compatibility C Style Grammatical YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO NO Negative number YES YES YES NO NOS YES YES NO NOS YES YES NO NOS YES YES NO NOT NO No Yes Yes No No No No No No No No No No No No No No No No No Yes Yes No No No No Yes Yes No No No Yes Yes No No Others YES YES YES YES YES YES YES YES YES YES YES YES Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Yes
Mark
C language specification
ANSI / ISO / IEC 9899-1999 (A.K.A. C99)
C language specification
ISO / IEC 14882-1998 (A.K.A. C 98)
C # language specification
ECMA-334
Java language specification
"The Java Language Specification" by Gosling, Joy, And Steler, Addison-Wesley, ISBN 0-201-63451-1
Object-oriented
This means supports class, member functions, inheritance, and virtual functions.
Inline assembly
Many C and C compilers support inline assembly, but this is not part of the language standards, and the grammar and quality of various implementations have great differences.
interface
The support of C on the interface is so unrequit, so that the IDL (interface definition language) makes up for this insufficient.
Module
Many people pointed out that C does not really support modules, they are right. However, many of the characteristics of the module can be achieved together with the namespace and header files of C .
Garbage collection
The Hans-Boehm garbage collector can be successful for C and C , but this is not part of the language standard.
Contract programming
An extended support contract programming of the DIGITAL MARS C compiler. A contractual programming of C technology and D supported by implementing contractual programming can be compared.
Growth array
A portion of the C standard library is used to achieve a growth array, but they are not part of the core language. A standard independent C (C 98 17.4.1.3) is implemented does not have to provide these libraries.
Introduction string
A portion of the C standard library is used to implement strings, but they are not part of the core language. A standard independent C (C 98 17.4.1.3) is implemented does not have to provide these libraries. This has a comparison of C strings and DCC strings.
Strong type definition Typedef
Strong Type Definition TypeDef can simulate a type with a structure package in C / C . If you want to use this way, it will make programming work very cumbersome, so it is not supported.
Use an existing debugger
This method means using those common debuggers that can process debug data in common executable file formats. You don't have to write a debugger that can only be used for a language.
Structural member alignment control
Although many C / C compilers include compiler instructions that specify struct alignment, there is no standard, and different compilers are generally incompatible. About structural members alignment, C # standard ECMA-334 25.5.8 only mentioned:
"The order in which members in the structure is not specified. For alignment purposes, anonymous fills can be added at the beginning, middle or end of the structure. The fill value is undefined." Therefore, although Microsoft may expand to support specific The member is aligned, but they are not part of the C # official standard.
Support all C types
C99 adds many new types supported by C .
80-bit floating point
Although the C and C standards specify the long Double type, few compilers (except Digital Mars C / C ) truly implement the floating point type of 80-bit (or longer).
Mix
In different programming languages, there are many different significances in mixing. D mixing means inserting (mix) insertion (mix) to the current scope. Mixing can be used globally, class, structures, or local levels. C mixed
C mixed refers to another set of technologies. The interface class of the same D is the same thing. Second, refers to a template that creates a form of the following form:
Template
{
... mixed out process ...
} D is different from this.
Comparison with ADA
James S. Rogers
Comparison diagram of ADA.
Internal (adapter) class
Nested classes are classes defined in another class scope.
Internal classes are categories that are capable of reference to members and domains of external classes; you can see them as a class that comes with the 'this' pointer to the external class containing them.
Error If I made any mistakes in this table, please contact me, I will correct it. - Walter Bright