Am 17.04.2011 21:52, schrieb jasonw: > Gour-Gadadhara Dasa Wrote: > >> Well, http://d-programming-language.org/ page says: "D is a multi- >> paradigm programming language that combines a principled approach >> with a focus on *practicality*." and in my case I've *practical* need to >> write GUI app. > > That's certainly true, if you think of the potential D2 provides. In 5 -- 20 > years D will be a serious contestant and mature implementations beat C++ and > traditional languages in many domains. Currently DMD produces much slower > executables especially for high performance computing so you would be a total > idiot to use D if the project time frame is less than 2 years.
*Much* slower? Really? What benchmarks are you citing? > > If you want to build some fortune 500 website from scratch, D doesn't deliver > the functionality you need right now. The PHP/Java/C# platforms have hundreds > of millions worth funding backing them. > > If you build a desktop application, D isn't the best choice, but you can > still argue to your boss to use it instead because of your personal > "productivity" issues. There's no other logical reason to use D instead of > C++/Qt or some other mature GUI toolkit. > > Bloated executables aren't suitable for embedded platforms either, but in 10 > -- 20 years we will have a D compiler that targets platforms with less than 4 > MB of RAM+ROM. I find it unlike that we have a reliable D compiler for very > small 32-bit embedded devices in 5 years. Do you really think in "10 -- 20 years" somebody will care of your code runs in an embedded platform with only 4MB of RAM+ROM? Memory etc is so cheap that these platforms will get more powerful. Why should it take so long to have such a compiler? On the one hand: Why are D executables so "bloated"? 1. Phobos and druntime is statically compiled in. On a really limited embedded platform you wouldn't use Phobos anyway, but write your own standardlib and runtime that suit your needs (it's not like anybody would use full C++ with STL on such a platform. Well, probably not even C++ at all or only a very limited subset). 2. Garbage from templates/CTFE. You just could use less templates and stuff for your embedded platform.. also I think this will be fixed soon(ish). Don just fixed many things in CTFE, maybe this already fixes bloat, but I'm not sure. So how long could it take until there's "a D compiler that targets platforms with less than 4 MB of RAM+ROM"? I'd say anywhere between right now and never. Maybe someone already decided to develop such a compiler and told nobody yet (right now). Or someone starts now or soon and has it ready in a year or two. If nobody is interesting in developing such a compiler, we'll never have one. So: It will be there once somebody develops it. If he takes LDC or GDC (or maybe even DMD) as a basis maybe something like that could be done relatively fast (if the team is big enough and has time etc). As mentioned before, Phobos would probably not be used on such platforms, so there's no need to wait for Phobos to become more mature/complete until developing such a compiler. Cheers, - Daniel
