Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: Agent Smith on July 20, 2006

Title: D programming language
Post by: Agent Smith on July 20, 2006
Hey guys,

Just wondering if anyone has ever used D (http://www.digitalmars.com/d/) at all.

I've been reading up on it and I'm quite impressed. It seems to address a lot of my misgivings about C++.
Also it's quite fast. On the Debian (language shootout) site it's actually up there with GCC on overall performance.
As well as the Digital Mars compiler, there's a GCC front end (called GDC) so it's good for cross-platform projects.
I've been using GDC on my MacÃ,  ;)

You can easily interface with any C libraries - I'm looking at using WxD for GUI apps and possibly SDL or Allegro for 2D games.
Not sure about a suitable 3D engine yet.

Anyway, I'd be interested in any of your thoughts on D. From what I can make of it, this new language looks the goodsÃ,  ;D
Title: Re: D programming language
Post by: relsoft on July 21, 2006
Design-wise, I think D is much better than C++.

Real OOP. Like Java and C# with automatic memory management.

The only drawback is that it's an evolving compiler with lesser suppot than C++.

The coolest PC space shooters I've played are made with D.

Google. "Kenta Cho"

Title: Re: D programming language
Post by: Shockwave on July 21, 2006
Last year when I was deciding to choose a new language to learn my judgement was clouded by D.
I downloaded devcpp and got my first embarrasing "Hello world" programs done with std.lib and then I saw D. I was much more impressed with what I saw, to the point where I couldn't decide which I wanted to use so I swapped both for freebasic.

Probably I'll go back to C++ before long but as a development language I think that D is great and it has a very cool list of features, and as rbraz says, it is a developing language without the support of C++ but I think that for that reason alone it is worth pursuing, just to support the language.
Title: Re: D programming language
Post by: TinDragon on July 21, 2006
I have looked at D but decided to go with C++ as it has been around alot longer and there's far more info, tutorials and books on the language to learn from. It's also a pretty much industry standard langauge so I thought it would be a good thing for me to learn  :)

However D is an interesting language and I agree with Relsoft, some top pc shooters coded in it ;)
Title: Re: D programming language
Post by: Agent Smith on July 22, 2006
 :) Thanks for the feedback guys. Especially relsoft - I didn't know about those cool shmups by Kenta Cho. Impressive stuff!
Especially Torus Trooper and it was interesting to see which libs he used (SDL, OpenGL, libBulletML, Mersenne Twister and Ogg Vorbis).
I've since found that D wrappers are freely downloadable for all of these, and more.

Ok, D is still undergoing refinement, but it should be reasonably stable now that it's in beta. Certainly stable enough for me, anyway.
I plan to transition to it completely. I've always thought that C++ is a horrendous, dog's-breakfast of a language - too complicated, too much baggage from C.

Right now I'm modding the BlitzMax IDE (MaxIDE) to compile .d source files instead of .bmx
There's a D utility called Build, which basically does the equivalent of "bmk makeapp" - greatly simplifying things. The main changes I'll have to make are for the D syntax highlighting.

Next I'll make a D wrapper for TinyPTC and try converting some test programs to DÃ,  Ã, ;)

Title: Re: D programming language
Post by: relsoft on July 23, 2006
Actually, my fav is rRootage. :*)

Panic shooter. :*)
Title: Re: D programming language
Post by: TinDragon on July 23, 2006
rRootage is one of my fav's :)
Title: Re: D programming language
Post by: Phoenix on August 10, 2006
I remember playing a pretty nice game called Torus Trooper, made in D. I was going to check it out, but never bothered.
Title: Re: D programming language
Post by: psygate on August 10, 2006
Actually... .Where can I get D? Is it Free? Is there any tutorial?
Title: Re: D programming language
Post by: Agent Smith on August 10, 2006
Yes, it is free and open source. You can get it here (http://www.digitalmars.com/d/) including tutorials (see also the Wiki).

See here (http://www.dsource.org) for more tutorials and D source code, including the Build utility.

Title: Re: D programming language
Post by: Shockwave on August 11, 2006
Thanks for the links Agent Smith.
Title: Re: D programming language
Post by: xteraco on August 12, 2006
blech, i'd rather spend my tiem coding in c++  ... D blech....  it makes me think about an argument i heard about c#...   it went something like this
"blah blah blah, c# has automatic garbage collector, blah blah"
"blah blah, you can code a garbage collector in c++"

end of argument
Title: Re: D programming language
Post by: relsoft on August 15, 2006
Is there a problem with automatic garbage collection?
Title: Re: D programming language
Post by: Agent Smith on August 15, 2006
He seems to be suggesting that the only advantage D (or C#) has over C++ is automatic garbage collection.