If you are a programmer than you probably know or at least know of C++ well now a company called Digital Mars is developing the D programming lanugage.

"D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of quality assurance, documentation, management, portability and reliability."

Basically this programming language is looking to combine the best of all there is out there using features from C, C++, C#, and Java as well as Python and Ruby as the quote mentions above. You can view a whole comparison of the different languages here:
http://www.digitalmars.com/d/comparison.html

Now I dont have very much experience coding other than some PHP and basic ideas of object oriented oriented programing. And as I understand it most programming languages are good for different things C++ because its fast, Ruby because its simple, Java because its easy to learn. You hear a lot of stuff like that. So I really like the idea of combining the best of all these languages because it just means it will lead to better programs and more people will be able to learn how to program.

D looks pretty good, but I don't think it'll replace c++ anytime fast, not too many people will jump on board (like companies) because they probably already have all their source in c++ or some other language. But the language looks good, I gotta try it out.

Ah well I do not want to go to D now I just learnt C++ I will stick with C++ unless D becomes really popular in the future because then there is more support.

It doesnt matter if there is support for it, its not like if I compile a program I wrote in D it wont work on someone elses computer.

Well D and C++ don't look too different, D is derived from c++ so you wouldn't really have to learn it, you could probably just pick it up without too much difficulty.

ive actually found c# to be faster than c++ on my 733MHZ that originally came with windows 98 pro(rocking ubuntu 9.10 now). however i like c++'s syntax and (for me anyway) easy to derive functions. however i still like c# i just wish there was linux support. however im sure there will be a few advantages in D. but ultimately im not done with c++ nor do i ever think i will be.

looks interesting, it looks to have made c++ simpler, very similar to c++. May catch on but it will take a while. Programming languages are not replaced overnight and usually they dont replace another language they just find people and companies who like it for a specific reason and its used for that reason.

"D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python.

Danger Will Robinson! Danger! Danger!

(Then again, PL/I worked out alright.)

It's now been four years since the original article was posted here. c++ is still alive and thirving languge. D?? I don't know a single person who uses it.

^ That's a relief. There was a lingering fear, even as I mocked it, that it would become the most important language ever and people might come here and see my mockery and cast me out of the good graces of Daniweb.

If you are a programmer than you probably know or at least know of C++ well now a company called Digital Mars is developing the D programming lanugage.

"D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of quality assurance, documentation, management, portability and reliability."

Basically this programming language is looking to combine the best of all there is out there using features from C, C++, C#, and Java as well as Python and Ruby as the quote mentions above. You can view a whole comparison of the different languages here:
http://www.digitalmars.com/d/comparison.html

Now I dont have very much experience coding other than some PHP and basic ideas of object oriented oriented programing. And as I understand it most programming languages are good for different things C++ because its fast, Ruby because its simple, Java because its easy to learn. You hear a lot of stuff like that. So I really like the idea of combining the best of all these languages because it just means it will lead to better programs and more people will be able to learn how to program.

D language is really similar to C/C++, Python as well as Ruby.

D is something like to try to create a car that can fly like an airplane and transport like a jumbo but with the facility to dive under the sea. And all of these applying restrictions to what C++ can do very well, just because something has decided that some features of C++ are "mistakes"!!

I have studied completely D and I am sure that this is another language that will make some little noise but will disappear very zoon. It do not have all the libraries tha has C++, D is not compatible with C (the most used language in the world), their compiler is totally new and it belong to a company so prepare to suffer from a lot of restrictions if you use it.

D is being conceived under the idea that C++ has some "mistakes" (who decide this?) and buala, Digital Mars will create a totally new language free of all these "mistakes".

Only one question: Are you sure that D don't have a lot of totally new mistakes?

For instance, Digital Mars has decided that multiple inheritance is a mistake so, they have removed it from D. Personally I think that this is a mistake in D.

Digital Mars has decided that new and delete are a "mistake" so they have created D without pointers and free memory management. They have included a garbage collector for the memory management. Digital Mars thinks that the memory management is so important that it must be assigned only to the computer. I think that memory management is so important that it must be assigned to the programmer. But what Digital Mars seems to forget is that C++ can be used also with a garbage collector!!

If you want to lose you time, as I did, please learn D.

Edited 1 Year Ago by Maritimo

readln and writeln? Holy flashback to my days with Pascal, Batman! It sounds like D is trying to be the Esperanto of computer languages. Hmm... Esperanto's taking over the world of human languages because it combined... Oh wait, that didn't happen. Visual D seems to only run on MicroSloth operating systems (in VisualStudio no less). And, it's still beta. It looks like it's not ready for primetime even on WinDoze yet.

They've got versions for Linux at the command line. That's OK to play with. But, it still isn't in the native Debian repos and it looks like the language itself is still beta-ish.

I think this is a wait-and-see language. I'll wait and see if it ever amounts to anything.

I agree that D might turn out to be another "Esperanto" programming language.

D seems to have tried to satisfy everyone, and therefore, pleases no one. I remember how Andrei was pitching D to C++ programmers by painting the language as essentially the same as C++ but with cleaner syntax for meta-programming, with python-style modules, and with native concurrency and parallelism constructs, and having all that while respecting the main tenants of C++ (scoping rules, value-semantics, templates, multi-paradigm programming, ease of making DSELs, etc.).

That all sounded great until they mention that D uses garbage collection, and not only that, but a "Java / .NET" style of garbage collector (a virtual machine supervising everything), instead of a "python / php" style (a reference counting scheme with a reference-cycle breaker). That's a big turn off for any C++ programmer. So, they had to backtrack a bit and provide some terrible "C++/CLI" style of managed vs. unmanaged memory. What is especially astounding is when you read their official description of garbage collection which sounds like it was written by a computer science freshman student, which is full of old myths and tales from Java echo chambers (like the fact that garbage collectors don't leak memory!! lol..). It kind of baffles me a bit because it has started to become clearer and clearer in the expert community that Java-style garbage collection is a failed experiment (along with its "checked exceptions"), and that consensus was building around the idea of Python-style collectors, if any garbage collection is to be done at all. This decision by the D language people shows an astounding lack of foresight and awareness, which makes one doubt everything else they claim is so great about D.

Put simply, D might be too much like Java or C++/CLI for any C++ programmer's taste, and it might be too much like C/C++ for any Java/C# programmer's taste.

D is being conceived under the idea that C++ has some "mistakes" (who decide this?) and buala, Digital Mars will create a totally new language free of all these "mistakes".

Only one question: Are you sure that D don't have a lot of totally new mistakes?

There is no doubt that C++ has lots of mistakes and compromises, like any other language. But most of the problems that C++ has are in the form of some weird or dangerous bits of syntax that it accepts (often inherited from C's much weaker type system) and in the form of features that people should only rarely use, or at least, require special attention (like multiple/virtual inheritance, goto's, etc.). But those problems are well-known and easily managed by most seasoned C++ programmers.

I think that that's the thing that people are neglecting to understand here: the devil you know is better than the devil you don't. System programmers (or infrastructure, or whatever you want to call them) use C++ because it has a lot of advantages that few other languages have, but they are also wary of its pitfalls and they cope with them, and they have for decades. If you ask them a language like D by saying that it has all the advantages of C++ and none of its pitfalls, they'll see that old salesmen tactic from a mile away. D might have none of C++'s pitfalls (even that is doubtful), because it has its own pitfalls, that so far not too many people know about or know how to cope with, due to the general lack of collective experience with this language.

When C++ came out, it didn't claim to solve all the pitfalls of C, quite the opposite in fact, it claimed to be pretty much the same as C, while solving a few of its pitfalls and extending it with object-oriented and template features. People familiar with C and experienced with its pitfalls were very comfortable to slowly adopt C++ by starting to use some of its "extensions" to C.

It's hard to adopt a new language when nobody knows anything about its pitfalls and "mistakes". And assuming that a language is perfect is beyond naive, it's foolish. D certainly has lots of "mistakes", and the fact that nobody really knows what they are or have experience coping with them is the frightening part.

And the fact that D requires garbage collection, but allows bare pointers and pointer arithmetic, and allows C or otherwise unmanaged pointers, and true stack objects (whose address can also be taken), sounds like a nightmarish plot to destroy what remains of the sanity of your average programmer. D cannot disable pointer aliasing (to remain a "system" programming language) but having a garbage collector makes a lot of pointer aliasing become undefined behavior (and really nasty consequence). Therefore, you can only do aliasing if you know the pointers to be pointing to non-garbage-collected memory, otherwise you'll get a disaster... this is a nightmare!

For instance, Digital Mars has decided that multiple inheritance is a mistake so, they have removed it from D. Personally I think that this is a mistake in D.

That's right. Lots of people hate multiple inheritance, especially those who are idiologically biased towards "pure" OOP. And there are definitely some practical difficulties associated with multiple inheritance (and especially virtual inheritance). But then again, some people wouldn't want to live without it. And there are definitely places (especially in meta-programming and generic programming) where it is very useful and "necessary".

But again, that's one of those known pitfalls of C++, people who see more problems with multiple inheritance than solutions just avoid using it, and people who find it useful in some context use it carefully and well. When D removes this feature, it makes no difference for those who never use it (except maybe flattering their ego), while those who used techniques that relied on multiple inheritance are now forced to find some other way to do it, and therefore, exposing themselves to other unknown pitfalls in the process. So, is this a net gain? No.

But what Digital Mars seems to forget is that C++ can be used also with a garbage collector!!

Right. Not only could you create a garbage-collected virtual machine for which you would compile your C++ code, but there are also many garbage-collector libraries for C++ out there that people are free to use in their projects. In other words, garbage collection is an available option in C++, and it has been for decades. But I have never seen C++ code that uses garbage collection. Why? Because I have never heard of a C++ programmer who would choose to use a garbage collector. At best, I have seen people argue about some very specific data structures that are easier to create when there is garbage collection, which is far from justifying a generalized language-requirement for garbage collection. This decision baffles me completely.

Edited 1 Year Ago by mike_2000_17: bad language

Comments
Very well explained. Thanks.