D Language

Miscellaneous Forums/General Discussion/D Language

Does anyone know anything about the D programming language?

Well, D Flat is the joke name for c#


http://en.wikipedia.org/wiki/D_(programming_language)

D is so last year, E is the future!

A programming lanuage called E??

Possibly this?

http://www.digitalmars.com/d/index.html

It's still growing and something has changed since my last visit, however a worth looking language.

Does anyone know anything about the D programming language?
Yes.

D is so last year, E is the future!
From what I understand E is somewhat older than D.

D is the latest curley braces language that has been designed as a successor to C++, trying to avoid or at least reduce all of C++' design flaws and at the same time make everything easier for the programmer. We've already heard that song from Java, C# and a zillion other languages. Since D does not have Java's or C#'s marketing machinery behind it, chances are that it won't become as popular as the two. But D was only released a day or two ago, so it is too early to say. Personally, I won't waste any time on it. I will rather take a closer look at ActionScript 3 and Python.

Somebody should invent a language called "Z", and put an end to this madness.

But D was only released a day or two ago, so it is too early to say.

Uh... no? Even version 1.0 came out at the beginning of January, and there were plenty of projects being developed on versions before that. Heck, registration for the community forums for 'D' go back to 2004.



Regardless, it's at least been used by the reknowned Kenta Cho for his Torus Trooper game, and (I believe) many others*.

*subject to correction

[edit] Actually, it turns out the top four games on his website were all written in various versions of D.

gfk - does the ZMachine count?

Wasn't E on the Amiga?

@Gfk .. invent a language called z ... LMAO (;-)

Seriously though, D looks promising but I am still doing battle with C.

Wasn't E on the Amiga?


Yes, I believe it came on one of the Fred Fish (who sadly passed on last month) PD disks. I remember it programming in it and it was a cross between C and Pascal.

LineOf7s - That's what got me interested... seeing someone create a game with D.

It doesn't seem half-bad. It's probably fast, and, best of all, multi-platform compatible (no, I don't have BMax).

Somebody should invent a language called "Z", and put an end to this madness.

Ummm...
http://en.wikipedia.org/wiki/Z_%28programming_language%29

Wasn't E on the Amiga?
Theres 2 one called E and AmigaE

I made a keynote speech this month abouth the language D at my University. It is a really really cool language.

We've already heard that song from Java, C# and a zillion other languages.
No. D pretends to be a capable sucessor to C++ in all the areas where C++ can be useful. Java and C# don't.

Amiga E was a bloody fantastic language. I used it to create a couple of add-ons for BBS software.

Wow, didn't realise E actually existed , well there u go.

It looks like a really nice language! They seem to have removed lots of C / C++ annoying syntax. It looks a little like basic to a point, as it looks so simple compared to C++. If it compiles direct to machine language, it also must be quite fast. I think it's a good idea.

D should be known. Thanks for the link yoko.

Cheers.

Hah, how about a language X? X would probably be a language that combines the simplicity of BASIC or Pascal with the raw power of C++, someone should develop such a language, IMHO.

That looks really cool. I wonder if it can be set up in a standard IDE.

@Chroma - yes, its just a commandline compiler.

I've played around with it for a few minutes, but not *really* used it.

I think its a neat language though. All module based, no headers! Garbage collected, but still provides explicit memory control where needed.

...I think I'll stick with c# though =) .

Hah, how about a language X? X would probably be a language that combines the simplicity of BASIC or Pascal with the raw power of C++, someone should develop such a language, IMHO.

Someone has already... It's called BlitzMax.. :)

Another new language that is still not as powerful or as flexible as Lisp.

Never used it but as someone mentioned, Kenta Cho (http://en.wikipedia.org/wiki/Kenta_Cho) has used D for some really nice 2D abstract shooters. Check them out if you're into that kind of game as they are some of the best.

Another new language that is still not as powerful or as flexible as Lisp.
???

It does not even follow the same programming paradigms.

What paradigms are those?

Object orientation? Lisp supports it.
Imperative Programming - Lisp supports it.
Functional programming - Lisp supports it.
Reflective programming - Lisp supports it.

I guess if you mean that D doesn't support all of the paradigms Lisp supports I'd have to agree.

Lisp ?!?
Doctor examining a girl with stethescope: "Big breaths"
girl : "Yeth, and I'm only thixteen !"

Sorry , couldn't resist :)

Ridiculous syntax? - Lisp supports it (or requires it).

Haha, well, it does seem ridiculous at first.

Of course, the truth is there is really "no syntax" outside of parenthesis. What you see is what you get. You never have order of operation problems, etc.

It's really just a visual parse tree of a program, and after a while the traditional syntax of other languages just seems clunky and poorly designed.

Granted, prefix notation is still harder to read than infix, although I imagine that might change with time and exposure.

Yeah, 'a*2+1' is much more difficult to understand than '(+ (* a 2) 1)'

Well, I did say infix notation is easier to read.

However, when operations get complicated, it can be easier with Lisp's prefix style.

Of course, the greatest power of Lisp is being able to create your own syntax or completely re-arrange the language at will. You could (and many, many have) write a macro that allows you to enter all of your mathematical operations as "a*2+1", which would then - prior to compilation - convert it to conforming lisp code. That's the beauty of it, you can meld any other language or syntax into lisp by writing macro's for it, and there is no overhead since the macro converts the code to lisp code prior to compilation.

The other day people were complaining that a for loop couldn't use a variable expression as a loop termination clause. Something like that could be added to Lisp with a minimal amount of effort, and it wouldn't affect anyone elses code, either. That ability to shape the language as needed (and even write new domain specific languages within it to help achieve the task at hand) is where it's true power lies.

Which I should add, the only reason I even piped up in regards to D is, while yes it seems like a nice language that overcomes a lot of the shortcomings of C++, it would be nice to see more people shift to Lisp development because that's the only thing holding it back as a language - lack of developers (and thus a lack of libraries and such, although things are picking up steam.)

I think if everyone spent 3-6 months learning Lisp and learning to code the "Lisp Way" (instead of say, trying to simply write imperative C code in Lisp or something), they'd really benefit and would loathe returning to other languages. Things like incremental compilation, extremely powerful macros that combined with the extreme regularity of syntax allow you to completely re-shape the language however you want, the ability to debug a running program without stopping it, the ability to declare new classes during run-time, reflection, etc, etc - when combined as they are in Lisp make it greater than the sum of it's parts.

What paradigms are those?
Well Seth... when talking about functional programming, Lisp is completely unbeatable, no doubts about that, and there are areas where Lisp is by far a great -or the best- option (Artifial Intelligence, mathematical notation...), but when talking about imperatives or object oriented languages, you cannot be serious putting Lisp on par with the other languages out there.

It's curious we are talking about this. The week after I made the keynote speech about D at my University, another guy made a conference about Lisp.

But yes, I like Lisp. For example, I use the software Maxima at university work because it uses Lisp, and it's perfect to do mathematical operations.

So if I were to jum ship (both hypothetically and figuratively) and use another language to make games, what would you guys suggest?

Keep in mind my major plusses are:
-Speed
-Completely Multi-Platform Compatable

...And Object-Oriented is good, but isn't a must-have.

Would you suggest Lisp? Or D? Or plain-old C?

Depends if you already know Lisp and find it easier to work with.

There are some libraries to interface lisp with SDL, and almost all lisp implementations have methods to interface with C code (though you might have to write some wrappers yourself.)

Lisp can be as fast (or, in most cases a bit slower) than C/C++ code when fully optimized, but that is a bit of work. It's a lot easier to write an unoptimized piece of Lisp code and get it to work, and then later go in and optimize as much as needed. This is because you don't declare type specifiers and such in Lisp. It's EXTREMELY easy to write generic code in lisp, and then later optimize it only if necessary.

Granted, there aren't a ton of game oriented libraries ready to go for lisp, and that would be it's biggest drawback. That and, for most simple casual games using C or C++ would probably be faster to develop in the end because of the access to common libraries, and since C/C++ are much more like Blitzmax than Lisp is (Lisp is a whole 'nother world.) If you were writing a strategy or simulation or some game with a lot of AI or some experimental algorithms and such, Lisp would be a great bet.

If you just want to broaden your programming horizons, and forever change your perspective of what is possible with a language, I'd recommend spending a couple months and getting a grasp of what makes Lisp Lisp. It's NOT the perfect tool for every job (although it could be if it was as popular as Python, considering it is many many times faster than Python and Lua and is capable of being used as a scripting language just as they are, except with easier integration to the rest of the code (no glue code).

But, given that it isn't that popular and a lot of libraries haven't been wrapped, I would only recommend Lisp under certain cirucmstances for game development.

One nice thing is, almost all Lisps are multi-platform. One drawback is, the nice Lisp implementations are a commercial product and can set you back over $1000.

Oh, and I don't know enough about D and game development to give it a thumbs up or a thumbs down.Hopefully Jedive can answer that.

D, taking many ideas from Java, is a really productive language which might be perfect for game development. There is only one problem: the developers are focusing on providing wrappers for low-level libraries. For example, through the Derelict library you have access to SDL and OpenGL. You should port MiniB3D or something if you want a 3D engine on top of that.

To be honest, I wouldn't recommend a BlitzMax user switching to D. It doesn't matter how much I love the D syntax, after all what really matters is the libraries you get with the language.

The most intersting use I can think of for D is to write a nice IDE and a set of modules for easy game development, something like what BlitzMax has. Considering that the GCC-based D compiler is open source and multiplatform, it looks like a dark horse.

Alright. Thanks all.

ah-ha, I thought this thread would get interesting.

I would have to argue that Lisp wouldn't be such a success as far as other languages. Mainly the fact that all the different programming paradigms would probably not mix very well. Sure, you could balance it all very well, and modules could be built to work together, but it would be extremely difficult, or extremely rare. I mean, just think of how many stories you've heard of people over-using C++'s object-oriented programming paradigm? Unless there was a lot of care to not over-use any of the available paradigms in Lisp, it would be very hard to use any libraries made with it.

I am honestly interested in learning more about using D. Its a shame that the current developers are working on lower level tools. But perhaps we could ban together and build some higher level tools. Would anyone be interested in joining me to build such tools for gaming? I'm not sure quite what we'd start making as I'd still have to learn the language and figure out what tools already exist, but I could certainly get started quickly.

I'm still happy with C over here :)
(And BlitzMax, of course)
Nice, simple, and old enough that I can't blame anything on the language.

Although I just started playing with C# and Mono, since MonoDevelop is the only all-round nice high level IDE I have found for the Linux desktop. It's quite fantastic, really! Keeps all the bother transparent and yet it doesn't annoy the hell out of me like Actionscript.

D looks pretty cool, but I think I will wait a while as it gains some more high-level meat. (And a good IDE to attract my attention. I would not be paying any attention to Mono had they not given it such a nice development environment! Those things work wonders).

Yeah, a good IDE can make a world of difference. I am developing C# in a free IDE called SharpDevelop (its a free one for Windows) and, from what I can tell, has all the GUI building features that Microsoft's IDE does (but probably not the support for other .NET languages). But I've had quite a bit of trouble with using C#. I was building a texture engine to work with a C# wrapper for OpenGL, and trying to delete a texture instance took several seconds to collect, and got increasingly longer the more often I collected it. Alright, so C# wasn't exactly built for real-time systems, but this kind of thing would kill any attempt to make a game with it. I also had quite a hard time getting proper network communications working between 2 programs. It took me some 4-8 tries to get it right. But... if you have success with Mono, go for it.

Oh, and I'm mostly happy with C myself too. But I'd like to explore what D has to offer.