⬆️ ⬇️

Place for D

On Habré has already published a translation of the article The Case For D by Andrei Alexandrescu. Translation, unfortunately, was made in haste, without outside help and advice, which could not but affect its quality. Later, a better and, more importantly, correct translation was collectively created, which we want to show. The old translation will be deleted so as not to create confusion.



Andrei Aleksandrescu - Place for D [link to pdf]

(the article is devoted to D - “high-level system language”, one of the developers of which is Aleksandrescu himself)



As a supplement (in order not to stoop to self-repetition and, possibly, to interest people who read the previous translation), we have compiled a small FAQ based on the questions that often arise during discussion D and may arise after reading the article.

')

Participants: Volfram , naryl , karbin - translation; maxter - grammar and spelling; eldar, digited, Nekuromento , karbin , RISC - technical issues. (They will be happy to answer any questions if given such an opportunity;))





D FAQ



What a mess with compilers and libraries that I end up using?


Strictly speaking, there is no confusion. It is enough to understand that, like any widely used enough language, D has several implementations.

Now there are two branches of the language:



The plans are D3.0, but so far not much is known about it. It is only known that its development will begin only after the transition of D2.0 to a stable state and the development of tools for it.

There are two actively developing compilers DMD and LDC:



For D1.0 there are two incompatible standard libraries. More precisely standard (Phobos) and alternative (Tango). Phobos was developing too slowly and the community, not content with the course of events, created a new library, which soon developed into industrial quality. In this regard, there is some confusion in the D1.0 world, since Some libraries and projects supported Phobos, while others used Tango, which automatically created problems when using projects that required different libraries.

There is no such problem in the D2.0 world. Phobos has grown, matured and matured, while Tango is still not ported to D2.0. Phobos also uses the druntime library based on the Tango code as its basis, which will allow them to live in conflict-free cohabitation in one project in the future.

So, if you need advice on which compiler and library you should use, then everything is simple:

For D1.0, use DMD in Windows and LDC in Linux, and Tango as the main library (most projects use it)

For D2.0, use DMD and Phobos.



Why then is there no documented standard of language?


As already mentioned, in essence, the definition of a language is the DMD compiler. It would be a very waste of time to write a standard for D2, given the speed with which it changes. For D1, there is an unofficial description on wiki4d and, apparently, the authors of the language consider this to be a sufficient temporary alternative until the stabilization of D2 occurs. According to some information, there is a contract between Walter and Andrey to coincide with the release of the book The D Programming Language not only to freeze the addition of new features in D2, but also to release the official specification of the language.



What are IDEs, how do they differ?


There are two main IDEs:



Poseidon, unfortunately, has not been updated for a long time, but remains completely ready for use. It has built-in good debugger support. IDE supports D1.0

Descent develops actively and works wonders like debugging templates and full semantic code analysis, revealing errors while writing code. The plugin fully supports D1.0 and has experimental support for D2.0.



Just recently, the upcoming Code Poet project was launched.



Language is already 10 years old, why is everything so bad (sad, sad, not inspiring)?


To begin with, it is worthwhile to decide what to consider as the moment of birth of the language and what requirements should be for it.

For good, it is wrong to say that the language is 10 years old. Before we got a ready-to-use compiler and standard library a lot of time passed, and it is this moment, I think, that should be considered the birth of a language. The tongue went through long prenatal flours and, having formed, was born.

Then, the phrase “why it’s so bad” is not appropriate. How "so bad"?

Why is language not a flagship industry? Because it is not worth the money bag. The language is created and maintained by the community for the sake of the community. But industry needs guarantees that the language will not disappear even after 10 years, that it will be stable, that it will provide the opportunities that the industry requires. D cannot give these guarantees. It is not known whether this is good or not, but I (we :)) will use it if I (us :)) have such an opportunity.

Why is there still no good tools and a well-developed development chain? Creating a good tool requires a lot of effort and time. Not everyone is willing to spend their time on something that may cease to exist in a couple of years, but those who decide, help D to move on, turning all new people. Walter Bright was going after a stable state of D2.0 (which will happen very soon) to create things that simplify the life of the D developer.



What are the plans for the development of language authors?


On the plans as a whole was a bit told in previous answers.

Regarding D2.0, the following will be added in the near future:



For D3.0 the following is planned:



Also about the development of the language can be read here (tyrk) .



What real programs are already written in D and fully operational?


It is difficult to name the list, because there are a lot of programs and they are all different.

Just not to remain unfounded:



A list of many current open-source D projects can be found here: (tyrk) . Do not worry that half of them are abandoned - this is offset by their number. Still, open-source is open-source :).



Do performance tests (relative to C ++)


There are, but, unfortunately, shoutout eliminated D from recent tests and the results are not very relevant, but even they give an idea that D practically does not lag behind the performance of C ++.

From this link you can take a look at the comparative tests of different compilers D for a variety of parameters.



And what would be so interesting to read on this topic?


http://prowiki.org/wiki4d/wiki.cgi?FrontPage

http://dprogramming.ru

http://www.digitalmars.com/d/

http://www.digitalmars.com/webnews/newsgroups.php?search_txt=&group=digitalmars.D

http://www.dsource.org

http://ru.wikibooks.org/w/index.php?title=D



I want to help develop a language, what can I do?


First of all, pay attention to the corresponding section of wiki4d . Here is a brief excerpt from there in translation:

Compilers Many people think that D cannot be taken seriously until at least several full-fledged compilers are created. You can join the development of LDC, participate in the conviction of Walter to realize something else in DMD or, perhaps, to revive the almost dead GDC project.

Debuggers. So far, there is not a single fully working debugger for D. But it is worth looking at least at developing a patch for gdb to support the naming scheme D.

Documentation. It is never enough.

Libraries. Following the link above, you can find the whole thematic "vis-lists".



What do you think about Go? :)


Go is an interesting, but still too young project. He, of course, will bring a fresh impetus to the development of server programs, but is not suitable for the title of a system language (at least, in the sense in which we understand the term "system language"). After a year and a half, perhaps it will be possible to take a second look at Go, in order to evaluate the work done and decide for yourself the need to use this language.

Source: https://habr.com/ru/post/75451/



All Articles