On 09/16/2011 11:47 PM, Peter Alexander wrote:
I recently stumbled across this (old) blog post:
http://prog21.dadgum.com/13.html

In summary, the author asks if you were offered $100,000,000 for some
big software project, would you use your pet programming language?

Yes, of course.


This is interesting, because if we answer "no" then it forces us to
think about the reasons why we would *not* use D, and perhaps those
concerns are what we should be focusing on?

---

To get the ball rolling, here are the reasons I would not use D for a
big project with high stakes:

1. If I had to port to ARM, or PowerPC, or some other architecture then
I would very likely have trouble finding a compiler and other tools up
to the task. I wouldn't have that problem with (say) Java or C.

You have $1000000000 to spend. Hacking together ARM support or even just a C backend cannot be that hard.


2. I'm not convinced that any of the available compilers would cope with
a very large code base. I don't know what the largest D2 project is, but
I think I would be right in saying that it has less than 1 MLOC.

Just split the giant codebase into modules and use di files. Linker tools are the same for D as C++ (except DMD Windows).


3. Depending on what the project was, I would probably be worried about
available libraries. If, for example, the project required the use of
DirectX, I'd just use C++.

DirectX is COM based, which means it can interface with D without a C layer. But there are also C API bindings.



4. I'd be worried about garbage collector performance, although this is
less of a concern than the others because it's not too difficult to work
around if you know you need performance up ahead.

Work around it, or develop a faster garbage collector. Again, 1000000000$.


5. If I did use D, I would (and do) force myself to use only simple
features. I would be too scared of the type system blowing up, or
obscure template errors causing pain. One error I always seem to get
when using Phobos is that it can't find a match for a function because
the types somehow didn't pass the template constraints for some obscure
reason. When there are multiple constraints, you don't know which is
failing. Often it is due to the complicated const/immutable/shared parts
of the type system.


Yah, DMDs error messages are cryptic sometimes. But const/immutable/shared are quite straightforward imho.

---

Essentially, I agree with his conclusion in the post. Tools and
libraries would be my biggest concerns (in that order). The fact that D
(usually) makes things easier for me barely registered when thinking
about this.

I have never needed more D specific tools than the D compiler itself.
Available libraries for D are a superset of available C libraries.



Reply via email to