Introduction
This book aims to teach the D language to readers who are new to computer programming. Although having experience in other programming languages would certainly be helpful, this book starts from the basics. If you are interested in learning how to program, I hope you will find this book helpful.
In order for this book to be useful, you will need an environment to write, compile, and run your D programs. This development environment must include at least the following:
- a text editor
- a D compiler
Instead of obtaining and installing those two separately, you may consider using an integrated development environment (IDE). You can find information about D editors and IDEs at the Editors and IDEs pages at dlang.org. You cannot learn to program in D without a text editor or a compiler. We will see how to install the dmd
compiler and how to compile programs soon in later chapters.
Each chapter of this book introduces as few new concepts as possible. Most chapters have a number of exercises at the end. These exercises are accompanied by their solutions, so that you can compare your solutions to mine. On the web version of this book, the solutions appear in a new browser window. On the PDF version, they are all at the end of the book.
I suggest that you do not skip chapters. If you come across chapters that you find to be particularly difficult, it may be because the book fails to introduce all of the necessary concepts. Please e-mail the author about such problems to help make this book more useful.
This book does not cover graphical user interface (GUI) programming. Although many programs are more usable with a GUI, GUIs are not directly related to programming languages. Furthermore, the design choices and programming styles of GUIs may interfere with those of the programming language and its standard library, and make it more difficult to learn the language. For that reason, this book includes only console programs. Once you learn D and its standard library, Phobos, you will be able to use any GUI library that you like.
The chapters of this book are made available online as they are translated from their Turkish originals. You can use the RSS feed to be notified about the availability of new chapters.
Learning to program is more fun when shared with others. Go to the D.learn newsgroup to follow discussions and to ask and answer questions.
Please e-mail the author with any comments and corrections regarding this book. Thank you.
Author: Ali Çehreli
- Ali Çehreli's résumé
- Interviews with him at Ceviz.net and at İzmir'de Sanat
- You can find him at Ceviz.net's C and C++ forums, at the Ddili Forum, and at the D newsgroups
- You can e-mail him at acehreli@yahoo.com