4 ms·
I am the author (of the book). AMA. Ali
by acehreli 11y ago
I am the author (of the book). AMA.
Ali
- deleted 11y ago[deleted]
- ob 11y agoHe means the author of the book, not the programming language.
- claudiug 11y agoWhy do you choose to write a book about dlang? Can you give us us some godo area when dlang can be used? Can we use dlang to build IOS/Android apps? What is the advances of this language over go, python, java, ruby, rust?
- acehreli 11y agoI've discovered D six years ago after reading Andrei Alexandreuscu's article "The Case for D" in one of ACCU's publications. D was a gasp of fresh air especially for people coming from C++ like myself. I used to frequent C and C++ forums on Turkish web sites and was aware of the need for up-to-date software documentation. I saw D as an opportunity to ensure that for once, Turkish documentation would not be behind the English ones. I started writing HTML pages without any idea that they would become a book later on. Then I've decided to use the tool Prince XML (free for personal use) to see the pages in book form. I made that PDF version available as well. I had never thought that my work would be valuable for an English-speaking audience. Then, Andrei and others convinced me that it would be a good idea to translate the book to English as well. I did that, added many more chapters, edited heavily (mostly by Luís Marques), and it worked! As far as I know, the book is the first software documentation that was translated from Turkish to English, as opposed to the other direction. D is a general purpose language. I don't know the status on the IOS/Android front. gdc, the D compiler using GCC back-end; and ldc, the D compiler using LLVM back-end can produce code for the platforms that those compilers support. However, don't take my word on that. I would expect issues. D is a compiled language that is as low as C (and of course inline assembly) and as high as Python and others. One benefit over Go is the fact that D's template support is the best that I know of. When compared to D's C++'s templates are almost unusable; very clumsy. Ali
- qznc 11y agoAdvantages compared to ... Go: Generic type-safe highly efficient code. Can go lower-level like inline assembly. Can go higher-level because more meta programming. Python: Faster. Static typing. Ruby: See Python. Java: Less boilerplate. More control over memory management. More meta programming. Natively compiled. Rust: Easier. Garbage collection makes programming just as safe and is easier to use. Looks and feels more like C/C++/Java, if you already know them. More meta programming. (of course, downsides of D are omitted ;)
- pcwalton 11y agoRust's safety is not limited to memory safety; you get data race freedom too. But the memory safety is the same (assuming you opt into SafeD).
- pjmlp 11y agoJava is also native compiled. Language != Implementation. OpenJDK is only the reference implementation. There are plenty of commercial implementations with AOT compilers. Edit: did not write != properly
- qznc 11y agoYes, but it shows that the language was designed for interpretation. E.g. lazy static initializers is weird in AOT compilation.
- pjmlp 11y agoIt is not weird in functional programming languages.
- qznc 11y agoI think you misunderstood me, because I used "lazy". It has nothing to do with Haskell lazyness. In Java static fields are initialized when a class is loaded by the class loader. A class is only loaded when used. If anything (IO,scheduler,etc) changes the order in which classes are used, then initializers are called in a different order and their side effects as well. This semantic is mandatory by language definition. In a Java AOT compiler this means every access to a static field must be prefixed with a (synchronized) check if the class is already initialized and optimizing it away is rarely possible. A JIT compiler does not even care, because it knows the class is already loaded. For contrast, in C++ static fields are all initialized before main is called.
- CyberShadow 11y ago> Can we use dlang to build IOS/Android apps? It's a work in progress, but simple things are possible. https://github.com/smolt/ldc-iphone-dev https://github.com/smolt/ldc-iphone-dev http://wiki.dlang.org/GDC/Installation/Android http://wiki.dlang.org/GDC/Installation/Android FWIW, I installed Debian on my Android phone, on which I installed GDC. Building and running D programs just worked.
- GmeSalazar 11y agoThanks for making the book available in EPUB and AZW3!
- ihaveajob 11y agoWhat development environment do you prefer for D? Old fashioned Vim/Emacs and the like, or any of the IDEs I see listed in the wiki (http://wiki.dlang.org/IDEs http://wiki.dlang.org/IDEs)?
- acehreli 11y agoI've been using Emacs for about 20 years now. Sorry, can't change that. :) Ali
- Ace17 11y agoJust ordered one!