2007年3月7日星期三

D语言

D语言 ,传说中的D语言.

D Language Feature Comparison Table
Feature D
Garbage Collection Yes
Functions
Function delegates Yes
Function overloading Yes
Out function parameters Yes
Nested functions Yes
Function literals Yes
Dynamic closures Yes
Typesafe variadic arguments Yes
Lazy function argument evaluation Yes
Arrays
Lightweight arrays Yes
Resizeable arrays Yes
Built-in strings Yes
Array slicing Yes
Array bounds checking Yes
Array literals Yes
Associative arrays Yes
Strong typedefs Yes
String switches Yes
Aliases Yes
OOP
Object Oriented Yes
Multiple Inheritance No
Interfaces Yes
Operator overloading Yes
Modules Yes
Dynamic class loading No
Nested classes Yes
Inner (adaptor) classes Yes
Covariant return types Yes
Properties Yes
Performance
Inline assembler Yes
Direct access to hardware Yes
Lightweight objects Yes
Explicit memory allocation control Yes
Independent of VM Yes
Direct native code gen Yes
Generic Programming
Class Templates Yes
Function Templates Yes
Implicit Function Template Instantiation Yes
Partial and Explicit Specialization Yes
Value Template Parameters Yes
Template Template Parameters Yes
Variadic Template Parameters Yes
Mixins Yes
static if Yes
is expressions Yes
typeof Yes
foreach Yes
Implicit Type Inference Yes
Reliability
Contract Programming Yes
Unit testing Yes
Static construction order Yes
Guaranteed initialization Yes
RAII (automatic destructors) Yes
Exception handling Yes
Scope guards Yes
try-catch-finally blocks Yes
Thread synchronization primitives Yes
Compatibility
C-style syntax Yes
Enumerated types Yes
Support all C types Yes
80 bit floating point Yes
Complex and Imaginary Yes
Direct access to C Yes
Use existing debuggers Yes
Struct member alignment control Yes
Generates standard object files Yes
Macro text preprocessor No
Other
Conditional compilation Yes
Unicode source text Yes
Documentation comments Yes
看样子还不错,不过真的需要一个新的语言么?我越来越觉得集大成的语言没有必要. 这些年C++被JAVA和C拉扯的结果.虽然C++的发展过程中许多新的技术被应用和发展,但是如果让我选择,我宁愿选择我很熟悉同时也能实现要求的语言. 原因很简单,用C++我不放心.对自己不放心.同时也不是很愿意花很多时间去dig编译器的工作. 我发现我在学校用了很多年的C++, 其实当C在用,后来工作了,用C却要当C++用,哈哈....

0 COMMENTS: