The D programming language

Started by
31 comments, last by swiftcoder 14 years, 9 months ago
Hello, I've been using C++ for quite some time now and I thought it might be handy to have some cross-language experience. Both for growing as a programmer and using that experience in C++ and for not turning into a dinosaur stuck with an old language. So I've been looking into D and it sounds really interesting, but I haven't been able to find any advanced tutorials. What are your thoughts on the future? Will D or C# be interesting for games? I haven't found a lot of middle ware that works with D, only something called "Derelict", but I guess that can change if it gains popularity by being really good. Andrei Alexandrescu, who is a C++ guru, shared some thoughts on the topic: http://www.ddj.com/hpc-high-performance-computing/217801225 He also wrote a book about it, I might buy it if I can't find any proper tutorials. Do you guys have any experience with D? How do you think D can relate to games? From what I read, it's like C++ but better designed, and therefore more productive. But you can still get your hands all dirty with pointer magic and disable the memory manager if you see an opportunity where you can outperform the garbage collector. PS. Yes, I would enjoy an interesting discussion on the pro's and con's of the languages.
Advertisement
Oooo it's time for our regular D thread.

D has been around for ages now, pre-.Net it might have had a point, now I feel less so.

Your comment about the libs is a telling one; "if it can become popular". So far it's failed to.

It's like the year of the linux desktop; every year someone will claim that this! this is the year!

And yet each time the world spins on and it doesn't happen...
Quote:Original post by Dolf
I've been using C++ for quite some time now and I thought it might be handy to have some cross-language experience.

May I suggest learning Haskell or Clojure then? D might be too similar to C++.

Quote:Original post by Dolf
[Andrei Alexandrescu] also wrote a book about it, I might buy it if I can't find any proper tutorials.

I am definitely going to buy it. I'm just into languages in general. Always nice to try new toys:
int[] arr = [ 1, 3, 4, 2 ];sort!("a > b")(arr);   // <--- SEXY AS HELLforeach (i; arr) writeln(i);
Quote:Original post by Dolf

cross-language experience.
Quote:Both for growing as a programmer
Quote:not turning into a dinosaur stuck with an old language.


D is a dialect. So is C#, Java, C, .... They are all a family of C languages and all follow the imperative paradigm. If you know one, you know all.

All of these are basically dinosaur languages.

Today, functional languages are the brave new world and the future (Lisp people sigh deeply).

Also, &#106avascript and Ruby.<br><br><!--QUOTE--><BLOCKQUOTE><span class="smallfont">Quote:</span><table border=0 cellpadding=4 cellspacing=0 width="95%"><tr><td class=quote><!--/QUOTE--><!--STARTQUOTE-->and therefore more productive.<!--QUOTE--></td></tr></table></BLOCKQUOTE><!--/QUOTE--><!--ENDQUOTE--><br>Productivity comes primarily from middleware or standard library (Java-like, everything and kitchen sink), community and adoption. Language itself has surprisingly little to do with it.
Maybe I'm a bit C++ biased but honestly I think C++ is underutilized. I'd rather see better written functions and more readable C++ code then argue over semantic tricks or benifits of 80% C++ language with 30% different quirks. For instance wouldn't it be nice to see more Unicode used. I found for instance if you use a unicode input tool such as unicodeinput.exe you can substitute π instead of D3DX_PI in your coding definations with a quick define header. So code like area=πr2 becomes really easy to understand which is really the goal of high level languages anyways.

Also when I see a sort in haskal when sort definitions have already been written I ask why reinvent the wheel(as I'm guilty of that myself).

As for .net you can mix the clr in C++ which is also nice and get the benefits of both traditional C++ and .NET.






Quote:Original post by Antheus
Quote:and therefore more productive.

Productivity comes primarily from middleware or standard library (Java-like, everything and kitchen sink), community and adoption. Language itself has surprisingly little to do with it.

And from good tool support (although maybe you grouped that under middleware). IMHO that's always been D's greatest failing - easy interop with C and C++ meant there were plenty of libraries usable from D, but there were never any good IDEs that I saw.
Quote:Original post by ptroen
As for .net you can mix the clr in C++ which is also nice and get the benefits of both traditional C++ and .NET.
I have seventy thousand lines of C++/CLI code sitting in front of me, forming a production library. The only thing "nice" about it is the sheer incredible achievement that it works at all. Useful yes; nice, not a chance.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Quote:Original post by DevFred
Quote:Original post by Dolf
I've been using C++ for quite some time now and I thought it might be handy to have some cross-language experience.

May I suggest learning Haskell or Clojure then? D might be too similar to C++.


I second both of those suggestions. Also consider picking up any of the other Lisp dialects, Smalltalk, Prolog, Forth, or APL - all of which will be quite mind-expanding for someone used to C++.

Quote:Original post by ptroen
Also when I see a sort in haskal when sort definitions have already been written I ask why reinvent the wheel(as I'm guilty of that myself).


You were probably looking at a code sample meant to showcase the language, and that's what a code sample is; a short snippet showing how to accomplish a common task. The rationale behind showing people these samples is, if the language can replace 20 lines of C code with 2, think of what it could do to a codebase with hundreds of thousands of lines.
Quote:Original post by OrangyTang
And from good tool support (although maybe you grouped that under middleware).


IMHO, tool support isn't strictly needed. &#106avascript, Python and Ruby on Rails are all example of it. &#106avascript hasn't had a decent debugger for years, Python got hold in academia, where IDEs are considered blasphemy. These days, many of new languages get quick support &#111;n JVM in either NetBeans or Eclipse, so this barrier has been lowered considerably, or completely eliminated (repository and general project management).<br><br>IDEs are important for very UI centric applications. Delphi and its legacy in .Net are great examples of that, Visual FoxPro is another. This is where VS and NetBeans made a huge difference. They tend to be relevant for business development, since they prove suitable for non-programmers, or at very least for non-dedicated programmers.<br><br>Conversely, as far as web apps go, UI tools have historically proven to be a dead end, and even the infrastructure has often been very rudimentary. Again, Eclipse helps to bridge the gap here for relatively low cost, with the myriad of other tools.<br><br>And then there's still the whole Emacs and vi crowd when it comes to C and C++.
Quote:Original post by Antheus
Quote:Original post by OrangyTang
And from good tool support (although maybe you grouped that under middleware).


IMHO, tool support isn't strictly needed. &#106avascript, Python and Ruby on Rails are all example of it. &#106avascript hasn't had a decent debugger for years, Python got hold in academia, where IDEs are considered blasphemy. <!--QUOTE--></td></tr></table></BLOCKQUOTE><!--/QUOTE--><!--ENDQUOTE--><br>True, you can get away without "big" tools like Eclipse and VS for languages which are looser with their types. But for strong, statically typed languages (which IMHO D falls under) you need a good IDE to be productive. Otherwise you waste huge amounts of time everytime you want to make even a trivial refactoring.

This topic is closed to new replies.

Advertisement