Foreword

Application developers today can choose from a lot of programming languages, but by and large, most development falls into one of three groups of languages:

  • The C and C++ group, where close-to-the-metal, high performance is desired, and the programmer is willing to work hard to get it.

  • The Java and C# group, where code is compiled into a "managed" environment. The languages tend to be simpler, and vast libraries of prewritten code are usually available.

  • The dynamically typed scripting languages, dominated by Perl, Ruby, and Python. These languages offer rapid development but have poor runtime performance.

Several thousand computer programming languages are in existence, with perhaps a dozen that are in mainstream use. If someone created a new language, who would even look at it? It's not like we had any corporate backing, a marketing department, or a billion dollars to promote it.

So, inspired by the words of Gimli the dwarf, "Certainty of death, small chance of success . . . what are we waiting for?" we set out to invent and establish a new mainstream programming language.

What could have possessed us to do this? While one would think there's a nut for every programming language bolt out there, it turns out that there's a gaping hole. Amazingly, there is no language that enables precise control over execution while offering modern and proven constructs that improve productivity and reduce bugs. What first comes to mind is C++, but C++ remains mired in its need to be backward-compatible with obsolete, decades old decisions. This makes it very difficult for C++ to adopt new ideas. Then there are the languages that compile to virtual machines (VMs) such as Java and C#. But those languages never seem to quite be able to shake off their performance problems, and of course, a VM-based language cannot offer to-the-metal capability.

And lastly, there are the scripting languages such as Perl, Ruby, and Python. These offer many advanced programming features and are highly productive, but have poor runtime performance compared with C++. They also suffer from lingering doubts about their suitability for very large projects.

Often, programming teams will resort to a hybrid approach, where they will mix Python and C++, trying to get the productivity of Python and the performance of C++. The frequency of this approach indicates that there is a large unmet need in the programming language department.

D intends to fill that need. It combines the ability to do low-level manipulation of the machine with the latest technologies in building reliable, maintainable, portable, high-level code. D has moved well ahead of any other language in its abilities to support and integrate multiple paradigms like imperative, OOP, and generic programming.

So why us? How could we possibly succeed with no money, no backing, no paid staff, no marketing department-nothing one would expect to be required for such a monumental task? It turns out that a lot of these apparent disadvantages are actually advantages. The D team doesn't have anyone to answer to (other than the people who use D). We aren't saddled by investors who don't understand what we're doing but want quick monetary results. D doesn't have to fit somewhere in a corporate product line; it isn't positioned as a loss leader to move some other product. There's no marketing department to tell us we have to revamp D to match the latest buzzword du jour.

Since we're all volunteers, we are working on D because we genuinely want to and are enthusiastic about D. There aren't any clock-punchers or short-timers working on D.

And lastly, we are free to open source the language.

The D team has other crucial advantages. Many of us have decades of hard-core experience with C, C++, Java, and Perl, and are intimately familiar with what works and what doesn't work. We've worked on one-time throwaway programs and million-line monsters. We've worked on solo teams and professional corporate teams. Many of us are active in the programming community, teaching seminars and giving technology presentations.

D is a labor of love. This book is one of the fruits of that. The authors are all prominent members of the D team. I hope that, reading between the lines, you'll see the joy we take in the elegance with which D expresses the intent of the programmer.

We created D because D is the language we always wanted.

Walter Bright

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.66.185