воскресенье, января 28, 2007
суббота, января 27, 2007
Я давно его хотел
D is an object-oriented, imperative, multiparadigm system programming language by Walter Bright of Digital Mars. It originated as a re-engineering of C++, but even though it is predominantly influenced by that language, it is not a variant of C++. D has redesigned some C++ features and has been influenced by concepts used in other programming languages, such as Java, C# and Eiffel. A stable version, 1.0, was released on January 2, 2007.
D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of quality assurance, documentation, management, portability and reliability.
D is statically typed, and compiles direct to native code. It's multiparadigm: supporting imperative, object oriented, and template metaprogramming styles. It's a member of the C syntax family, and its look and feel is very close to C++'s. For a quick feature comparison, see this comparison of D with C, C++, C# and Java.
// Simple sample: how to use delegates within objects
import std.c.stdio;
// DelegateClass: a class with declared delegate function "printText"
class DelegateClass
{
public void delegate(char[] ) printText;
}
int main()
{
// Function print
void print(char[] text) { printf(text); }
// Initialize a DelegateClass
DelegateClass delclass = new DelegateClass();
// Assign the delegate "printText" to function "print"
delclass.printText = &print;
// Call printText to test
delclass.printText("HELLO\n");
return 0;
}
D perfomance:http://www.functionalfuture.com/d/
Other links:
http://www.digitalmars.com/d/
http://en.wikipedia.org/wiki/D_language
Подписаться на:
Сообщения (Atom)