The D programming language

have you guys ever heard of D? Someone made it to be the successor to C++. It actually seems cool, mixing high level aspects with low level.

the site
http://www.digitalmars.com/d/

a short descrition
http://en.wikipedia.org/wiki/D_programming_language

the question is what do you guys think?
{2}rIng
«13

Comments

  • : have you guys ever heard of D? Someone made it to be the successor to C++. It actually seems cool, mixing high level aspects with low level.
    :
    : the site
    : http://www.digitalmars.com/d/
    :
    : a short descrition
    : http://en.wikipedia.org/wiki/D_programming_language
    :
    : the question is what do you guys think?
    : {2}rIng
    :


    The only things that appeal to me are that I think you can make whole sections of code "volatile" or thread safe by just writing a keyword + {} around it.

    But it has garbage collection... so everyone just laughs at the language as they do at Java and C#. Nice try, though.
  • In my humble vision, I don't see an improvement in elegance nor functionality, except a little bit in the function arguments of [b]main[/b], but I'd have preferred main to have arguments [b]const std::vector& args[/b]. In my humble opinion, I don't see the problem of using C++ with the many excellent libraries out there (STL, Boost, VCL).

    A successor is not always better (e.g. Pokemon 2).

    See ya,
    bilderbikkel

  • : : have you guys ever heard of D? Someone made it to be the successor to C++. It actually seems cool, mixing high level aspects with low level.
    : :
    : : the site
    : : http://www.digitalmars.com/d/
    : :
    : : a short descrition
    : : http://en.wikipedia.org/wiki/D_programming_language
    : :
    : : the question is what do you guys think?
    : : {2}rIng
    : :
    :
    :
    : The only things that appeal to me are that I think you can make whole sections of code "volatile" or thread safe by just writing a keyword + {} around it.
    :
    : But it has garbage collection... so everyone just laughs at the language as they do at Java and C#. Nice try, though.

    I am an experienced C++ and C# coder and certainly do not laugh at C#. It is nice to write your own clean-up stuff, but if you don't have to, it's nicer.
    It is also nice to write your own printf function, but if you don't have to...see what I mean?




    Greets,
    Eric Goldstein
    http://www.gvh-maatwerk.nl


  • : : : have you guys ever heard of D? Someone made it to be the successor to C++. It actually seems cool, mixing high level aspects with low level.
    : : :
    : : : the site
    : : : http://www.digitalmars.com/d/
    : : :
    : : : a short descrition
    : : : http://en.wikipedia.org/wiki/D_programming_language
    : : :
    : : : the question is what do you guys think?
    : : : {2}rIng
    : : :
    : :
    : :
    : : The only things that appeal to me are that I think you can make whole sections of code "volatile" or thread safe by just writing a keyword + {} around it.
    : :
    : : But it has garbage collection... so everyone just laughs at the language as they do at Java and C#. Nice try, though.
    :
    : I am an experienced C++ and C# coder and certainly do not laugh at C#. It is nice to write your own clean-up stuff, but if you don't have to, it's nicer.
    : It is also nice to write your own printf function, but if you don't have to...see what I mean?

    [blue]Those languages are very nice for desktop apps, but nothing else.
    The point is: why create a general purpose programming language that you can only use for one thing?

    (I certainly didn't laugh when I had to deliver 20MB runtime junk together with my program written in .NET, but that's another story... :-))

    Seriously, I know what you mean, but to me it seems like they invented garbage collection only to satisfy all the sloppy programmers who can't find their own bugs / memory leaks. Imo it is better to find the leaks instead of hiding them behind the garbage collector...
    [/blue]
  • I guess, but it matters what ur doing.

    Lundin dude, you probably didn't read the wikipedia description. You actually have the option of turning off the garbage collection for either parts of the program or the entire program. I think it said you could also put explicitly instantiate/remove objects with the C functions (malloc()/realloc())

    Thats what makes D special (not as a replacement). I actually read this in the specs a while ago. It said it was a practical language. It gives high level features, but leaves the low level because sometimes its needed. Like it said how its features can make programming in it possible without pointers, but pointers weren't left out, he kept it because there are exceptions.

    Not as a replacement though. I still like C/C++. I think I'll look at D a little longer just to see what is like.
    {2}rIng
  • : I guess, but it matters what ur doing.
    :
    : Lundin dude, you probably didn't read the wikipedia description. You actually have the option of turning off the garbage collection for either parts of the program or the entire program. I think it said you could also put explicitly instantiate/remove objects with the C functions (malloc()/realloc())
    :
    : Thats what makes D special (not as a replacement). I actually read this in the specs a while ago. It said it was a practical language. It gives high level features, but leaves the low level because sometimes its needed. Like it said how its features can make programming in it possible without pointers, but pointers weren't left out, he kept it because there are exceptions.
    :
    : Not as a replacement though. I still like C/C++. I think I'll look at D a little longer just to see what is like.
    : {2}rIng
    :

    Oh, that is more like it, then :-)

    The sad truth is that a programming language won't be successful unless you have a company like MS or Sun promoting it. It doesn't matter if the language is good or not.
  • :
    : Oh, that is more like it, then :-)
    :
    : The sad truth is that a programming language won't be successful unless you have a company like MS or Sun promoting it. It doesn't matter if the language is good or not.
    :

    I hate this world X(
    {2}rIng


  • : Lundin dude, you probably didn't read the wikipedia description. You actually have the option of turning off the garbage collection for either parts of the program or the entire program. I think it said you could also put explicitly instantiate/remove objects with the C functions (malloc()/realloc())

    : Thats what makes D special (not as a replacement).
    Why does garbage collection make D so special? At first C# has garbage collection as well (and many many more languages). At second, in C++ you have excellent possibilities to manage the memory yourself, using smart pointers (e.g. std::auto_ptr, boost::scoped_ptr and boost::shared_ptr (www.codepedia.com/1/CppAutoPtr, www.codepedia.com/1/CppScopedPtr and www.codepedia.com/1/CppSharedPtr respectively).

    So, what's left that makes D so special?

    See ya,
    bilderbikkel

  • Its not the garbage collection that makes it special, its the fact u have a choice. I also said how its features can keep one from using real pointers ( I forgot which, and its hidden in the specs, so it'll take a whilke to find.), but it includes pointers anyway. A waste? No, for it serves its purpose, to be practical. Sometimes there is a need for low level stuff, so its still there. Its like having the new and old together, I think.

    Another low level thing it has, considering its high level garbage collector, is inline asm. Of course, Java and C# can't have inline asm because there are atop platforms. Big constrast, huh? Thats what seems special, the fact it has high level features, but at the same time, has low level features that it still can be a systems programming language.

    Read the wikipedia thing on it, its shorter and to the point.
    {2}rIng
  • : Its not the garbage collection that makes it special, its the fact u have a choice. I also said how its features can keep one from using real pointers ( I forgot which, and its hidden in the specs, so it'll take a whilke to find.), but it includes pointers anyway. A waste? No, for it serves its purpose, to be practical. Sometimes there is a need for low level stuff, so its still there. Its like having the new and old together, I think.
    :
    : Another low level thing it has, considering its high level garbage collector, is inline asm. Of course, Java and C# can't have inline asm because there are atop platforms. Big constrast, huh? Thats what seems special, the fact it has high level features, but at the same time, has low level features that it still can be a systems programming language.
    :
    : Read the wikipedia thing on it, its shorter and to the point.
    : {2}rIng
    :


    ANSI C doesn't have inline asm either, while C++ supports it in the standard.

  • : [blue]Those languages are very nice for desktop apps, but nothing else.
    : The point is: why create a general purpose programming language that you can only use for one thing?
    [red]That's absolute crap. I wrote dozens of batch-oriented stuff in C#. It runs slower, but you develop faster.
    If speed is the main issue, use C++ or asm. But that's it.
    Web-applications are also extremely easy to create.
    [/red]

    : (I certainly didn't laugh when I had to deliver 20MB runtime junk together with my program written in .NET, but that's another story... :-))
    [red]The runtime will be part of the OS soon, as MSVCRT.DLL became part of the OS after Win95.
    Did you deliver MSVCRT.DLL, about 400 Kb, with your C/C++ apps before Win98? Taking the growth of the harddisc-capacity into account, 20Mb is as much as the 400 Kb.
    [/red]

    : Seriously, I know what you mean, but to me it seems like they invented garbage collection only to satisfy all the sloppy programmers who can't find their own bugs / memory leaks. Imo it is better to find the leaks instead of hiding them behind the garbage collector...
    : [/blue]
    [red]
    Well, your right about the reason garbage-collection was invented. But since it became so common that apps contained memory leaks, garbage collection is the better option imo.
    It may be better to find your own leaks in a sense of 'knowing your code'. But it is not an issue to even think about in .NET. I see that as an advantage. Besides that, the .NET garabage collector is generally more efficient than doing it yourself in C++. It runs in its own thread, destroying objects in idle time. Great.
    Admitted, I want to clean up myself every now and then too. But when I do, I realize that this is so because of my C++ background. No other reason.
    [/red]

    Greets,
    Eric Goldstein
    http://www.gvh-maatwerk.nl


  • :
    : ANSI C doesn't have inline asm either, while C++ supports it in the standard.
    :
    :

    R u serious!?!?!?!? I think my love of C dropped a notch...

    But inline asm is very much compiler indepedent, the syntax, right? Or was it not made standard at the time because asm varies from machine to machine?
    {2}rIng
  • : :
    : : ANSI C doesn't have inline asm either, while C++ supports it in the standard.
    : :
    : :
    :
    : R u serious!?!?!?!? I think my love of C dropped a notch...
    :
    : But inline asm is very much compiler indepedent, the syntax, right? Or was it not made standard at the time because asm varies from machine to machine?
    : {2}rIng
    :


    Every C compiler has got inline asm, but there is no standard.
    The syntax can be:

    asm (NOP);
    asm ("NOP");
    asm { NOP };
    asm { "NOP" };
    asm NOP;
    asm "NOP";
    _asm
    __asm

    ...and so on. The instructions themselves are of course depending on the assembler/CPU rather than the C compiler.

    In C++ I believe it is only valid to write

    asm ("NOP");

  • another reason to hate this world X(
    {2}rIng
  • :
    : But inline asm is very much compiler indepedent, the syntax, right? Or was it not made standard at the time because asm varies from machine to machine?
    : {2}rIng
    :


    inline is very much compiler dependent -- each compiler implements it in different ways even for the same target system. asm is very much NON-PORTABLE, so if you plan to compile a program with different compilers and/or for different target platforms, then do not use it at all. besides, most good optimizing compilers today produce very efficient assembly code, so rolling your own assembly is not very worthwhile today.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories