RealTime IT News

When Is D Better Than C? When It's a Language.

At this point, the world may have more programming languages than spoken languages, but that's not stopping the creation of even more. This week, Digital Mars released the D programming language, which it says addresses the issues and shortcomings of C/C++.

D is the brainchild of Walter Bright, the main developer of the first native C++ compiler, Zortech C++, which Symantec  acquired in 1991 and sold under its own name, only to sell it back to Bright in 2000. He has maintained and sold the compiler under the Digital Mars brand since then. Bright also developed the compiler in Symantec's Java toolkit, Visual Café.

The D language is free, with a compiler and standard libraries for Windows and Linux. The compiler front-end and Phobos standard library are open source, and there is a D compiler for GCC, the popular open source C compiler. It produces compiled code, with no need for a virtual machine.

While meant as an improvement to C/C++, D retains a great deal of backwards compatibility with C code. It's possible to interface with any C API  without a call interface.

However, it is not fully backwards compatible with C code, and adds many functions from Java and Microsoft's C#, such as garbage collection, an inline assembler and Java-style single inheritance.

D has been under development since 2001, with considerable input from the Slashdot/open source developer community. Well before its launch it had a sizable support base.

Bright said D builds on the experience of C++ programmers and is not designed to sell a particular product or platform, as many new languages often do. "The idea is to make programming in D the most productive possible. Quicker to learn, quicker to write code in, quicker to debug, and quicker to maintain," he told Internetnews.com via e-mail.

The most common operations get the most core language support, such as declaring variables. Default behaviors are carefully set up to be the most desired and the safest, operations, he said.

Jeff Hammond, analyst with Forrester Research, said it will take some time before he's convinced D can gain a foothold. "If I see VC backing or deployed apps running it, then I might think there's some potential," he told internetnews.com.

Of course, history is full of humble beginnings for technologies, like Linux. Linus Torvalds was an unknown Finnish college student when he first uploaded the Linux 0.1 kernel on the Internet in 1991, Hammond noted. Bright is well-known among developers for his Zortech compiler. That said, Linux had an interesting business model. Operating systems back then were expensive and people wanted a choice.

The inflection point was when venture money and small businesses sprang up around Linux. "To make a technology viable, the technology has to be more than just good. You have to build a business model around it," said Hammon. "What's the business model here?"