Jump to page: 1 2
Thread overview
what sets (or WILL set) D apart from C/C++?
Jul 10, 2004
Matthias Becker
Jul 10, 2004
Andy Friesen
[OT] what sets (or WILL set) D apart from C/C++?
Jul 10, 2004
David Barrett
Jul 10, 2004
Ben Hinkle
Re: Embedding HTML (was [OT] what sets (or WILL set) D apart from C/C++?)
Jul 18, 2004
J C Calvarese
Jul 10, 2004
Matthew
Jul 11, 2004
David Barrett
Jul 12, 2004
Brad Anderson
Jul 12, 2004
David Barrett
Jul 10, 2004
teqDruid
Jul 10, 2004
Matthew
Jul 11, 2004
John Reimer
Jul 11, 2004
Mista
Jul 11, 2004
Russ Lewis
July 10, 2004
i won't lie to you, i love D.  i wish i could just convert all my projects over from C++ and start using it exclusively.

however recently i found something on a forum somewhere, where basically someone made that statement that right now, D is "just another way to call C functions."

granted, D isn't even finished yet, and with the lack of "for D" stuff compared to "for C/C++" stuff, it's not surprising that we have to use all the stuff made "for C".  but i'm somewhat inclined to agree with them in a broader sense.

D is very C++ like, unsurprisingly.  it is an evolution of C++.  but how much of an evolution?

C++ of course is set apart from C for one major reason - OOP and everything that goes with it.  not to mention it fixes some little stupid things in C (certain syntaxes and whatnot).  but what is so different about D to set it apart from C++ as "the next step"?  sure, it's laid out in a more intuitive way, it removes some stupidities of C++ (*^%$&$ FORWARD DECLARATIONS), it simplifies certain basic data handling - but what REALLY makes it worthy of being D and not C+=2 ?  ;)

maybe the simplicity and rethought is enough.  of course the fact that it's not backwards compatible for the most part makes it a separate language ;)

but what are your thoughts?  do you think that D is enough to be a successor to C++?  is it a nice little accompaniment?  or has it yet to recieve the final blow if you will that will make it *truly* a proper successor to C++?


July 10, 2004
>i won't lie to you, i love D.  i wish i could just convert all my projects over from C++ and start using it exclusively.
>
>however recently i found something on a forum somewhere, where basically someone made that statement that right now, D is "just another way to call C functions."
>
>granted, D isn't even finished yet, and with the lack of "for D" stuff compared to "for C/C++" stuff, it's not surprising that we have to use all the stuff made "for C".  but i'm somewhat inclined to agree with them in a broader sense.
>
>D is very C++ like, unsurprisingly.  it is an evolution of C++.  but how much of an evolution?
>
>C++ of course is set apart from C for one major reason - OOP and everything that goes with it.  not to mention it fixes some little stupid things in C (certain syntaxes and whatnot).  but what is so different about D to set it apart from C++ as "the next step"?  sure, it's laid out in a more intuitive way, it removes some stupidities of C++ (*^%$&$ FORWARD DECLARATIONS), it simplifies certain basic data handling - but what REALLY makes it worthy of being D and not C+=2 ?  ;)
>
>maybe the simplicity and rethought is enough.  of course the fact that it's not backwards compatible for the most part makes it a separate language ;)
>
>but what are your thoughts?  do you think that D is enough to be a successor to C++?  is it a nice little accompaniment?  or has it yet to recieve the final blow if you will that will make it *truly* a proper successor to C++?
>
>

Yes, good point. D has some small thinks that you miss in C++. But it's still
very close.
It has some nice things like lambda expressions (called Function literals) and
nested functions which is very cool, as it helps a lot in programming a bit
functional.
But to set D realy appart we'd need some interesting things perhaps from other
paradigms, like functional or logical prgramming. OK, I don't know very much
about the logical paradigm, but what I kow so far looks pretty cool, but I have
no idea how to put this in a language like D. I've heard JMatch is a
Java-Exteions that just doe that. Perhaps it's worth looking at it.

But as Walter seems not to be intereted in functional or logical programming the chance that we get fatures like this is small.



July 10, 2004
Jarrett Billingsley wrote:
> i won't lie to you, i love D.  i wish i could just convert all my projects
> over from C++ and start using it exclusively.
> 
> however recently i found something on a forum somewhere, where basically
> someone made that statement that right now, D is "just another way to call C
> functions."
> 
> granted, D isn't even finished yet, and with the lack of "for D" stuff
> compared to "for C/C++" stuff, it's not surprising that we have to use all
> the stuff made "for C".  but i'm somewhat inclined to agree with them in a
> broader sense.
> 
> D is very C++ like, unsurprisingly.  it is an evolution of C++.  but how
> much of an evolution?
> 
> C++ of course is set apart from C for one major reason - OOP and everything
> that goes with it.  not to mention it fixes some little stupid things in C
> (certain syntaxes and whatnot).  but what is so different about D to set it
> apart from C++ as "the next step"?  sure, it's laid out in a more intuitive
> way, it removes some stupidities of C++ (*^%$&$ FORWARD DECLARATIONS), it
> simplifies certain basic data handling - but what REALLY makes it worthy of
> being D and not C+=2 ?  ;)
> 
> maybe the simplicity and rethought is enough.  of course the fact that it's
> not backwards compatible for the most part makes it a separate language ;)
> 
> but what are your thoughts?  do you think that D is enough to be a successor
> to C++?  is it a nice little accompaniment?  or has it yet to recieve the
> final blow if you will that will make it *truly* a proper successor to C++?

D has lots and lots and lots of little nuances that are just plain nice to have.  Most of those little things don't mean much, but it doesn't take long before they add up.

Really, though, if you look at every successful language over the past 10-20 years, the ones that stuck around tended to be the ones that borrow bits and pieces of everything from other languages.  (including C++)

I think the pivotal aspect will be the tools.  I spent some time playing with MS's new C# Express beta, and the editor alone made a boring, crippled language easy, even fun, to write. (particularly the refactoring tools) Visual C++ pales in comparison, and the complexity of the language lends little hope for it ever catching up.

Maybe an Eclipse plugin is a bigger deal than it looks at first glance. :)

 -- andy
July 10, 2004
"Andy Friesen" <andy@ikagames.com> wrote in message news:ccp9ii$135u$1@digitaldaemon.com...
> I think the pivotal aspect will be the tools.  I spent some time playing with MS's new C# Express beta, and the editor alone made a boring, crippled language easy, even fun, to write. (particularly the refactoring tools) Visual C++ pales in comparison, and the complexity of the language lends little hope for it ever catching up.

Speaking of tools, I think a great D feature is it's ability to work with HTML seamlessly.  I'd like to see what an IDE could do with this.  Screw Doxygen -- just make the source code and the documentation the same thing! Embed UML state diagrams right into comments.  Create RSS feeds for file changes.  Who knows, but I think there are some cool possibilities that would be hard to match with other languages.

-david


July 10, 2004
David Barrett wrote:

> "Andy Friesen" <andy@ikagames.com> wrote in message news:ccp9ii$135u$1@digitaldaemon.com...
>> I think the pivotal aspect will be the tools.  I spent some time playing with MS's new C# Express beta, and the editor alone made a boring, crippled language easy, even fun, to write. (particularly the refactoring tools) Visual C++ pales in comparison, and the complexity of the language lends little hope for it ever catching up.
> 
> Speaking of tools, I think a great D feature is it's ability to work with HTML seamlessly.  I'd like to see what an IDE could do with this.  Screw Doxygen -- just make the source code and the documentation the same thing! Embed UML state diagrams right into comments.  Create RSS feeds for file changes.  Who knows, but I think there are some cool possibilities that would be hard to match with other languages.
> 
> -david

Has anyone really tried using the HTML feature? The example dmd/samples/d/hello2.html isn't a great example (IMHO) since the code has html tags to turn parts of it blue and working with code in a text editor that has the coloring *built-in* to the file is nasty; instead the coloring should be done by the editor and some style-guides. I'd rather see an example where the HTML stuff is used for the comments and the code remains pure text. Another advantage of doxygen is that it creates all the hyperlinks and cross-referencing automatically so you don't have to do it all by hand.

On a related topic has anyone tried Knuth's "literate programming"? It also mixes documenting the code with the code itself. Looks pretty wierd, though. Having edited tex.web by hand it can be pretty grueling to debug.
July 10, 2004
On Sat, 10 Jul 2004 10:42:30 -0700, Andy Friesen wrote:
> 
> Maybe an Eclipse plugin is a bigger deal than it looks at first glance. :)
> 
>   -- andy

Was that an offer to do some coding on eclipseD? (It still needs a good code formatter... and an bloody icon...)
July 10, 2004
"Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:ccp18i$m9s$1@digitaldaemon.com...
> i won't lie to you, i love D.  i wish i could just convert all my projects over from C++ and start using it exclusively.
>
> however recently i found something on a forum somewhere, where basically someone made that statement that right now, D is "just another way to call C functions."

What's wrong with that? IMO, that's what every language should be, and one of the reasons why Java is a dead dog, and Ruby and Python are preferable to Perl.

> granted, D isn't even finished yet, and with the lack of "for D" stuff compared to "for C/C++" stuff, it's not surprising that we have to use all the stuff made "for C".  but i'm somewhat inclined to agree with them in a broader sense.
>
> D is very C++ like, unsurprisingly.  it is an evolution of C++.  but how much of an evolution?
>
> C++ of course is set apart from C for one major reason - OOP and everything that goes with it.  not to mention it fixes some little stupid things in C (certain syntaxes and whatnot).  but what is so different about D to set it apart from C++ as "the next step"?  sure, it's laid out in a more intuitive way, it removes some stupidities of C++ (*^%$&$ FORWARD DECLARATIONS), it simplifies certain basic data handling - but what REALLY makes it worthy of being D and not C+=2 ?  ;)

- D doesn't have Return Value Lifetime issues.
- D obviates instance slicing problem
- D reduces the amount of operator abuse possible (although that's creeping in)
- D provides array slices.
- D uses modules rather than the inclusion model

That mind not sound much, but it's actually a great deal. AFAICT - which is not far at this time of the morning - everything else is pretty much syntax. But I still think these 5 + syntax represent a big win.

> maybe the simplicity and rethought is enough.  of course the fact that it's not backwards compatible for the most part makes it a separate language ;)

Let's look at it another way. I've ingested so much C++ over the last 13 yrs or so that I think I can claim to be reasonably good at it. However, I still have a mental fog when I look at some other people's code, and that's not just because most people are sloppy as all hell when it comes to their code layout. It's the complexity of the language.

But C++ is so powerful (including the ad/mis-use of many of its flaws) that I don't see me giving it up, ever. However, most times I've been asked in the last couple of years what language I would recommend someone to learn, when they want to understand compiled languages, "C++" or ".NET", I've responded "D".

> but what are your thoughts?  do you think that D is enough to be a successor to C++?

No

>  is it a nice little accompaniment?

Rather it's a powerful language in its own right, with a big future ahead of it.

>  or has it yet to recieve the
> final blow if you will that will make it *truly* a proper successor to C++?

Nope. I think C++ has a long lifetime ahead of it, despite its flaws and complexity.

Why should D have to replace C++ to be a success? Java didn't kill C++ - far from it - and yet we could still call Java a success. (In a commercial sense, of course, not technically!) C#/.NET isn't going to do it. Why should D have to/want to?

I'll give you an example. At the moment, I'm writing a compiler multiplexer tool that will go on the CD for my book (http://imperfectcplusplus.com/). Walter asked me last week why I wasn't writing it in D. There are several reasons. The multiplexer must be portable to most/all operating systems. It must be ready now, and D isn't. It itself must be compilable by most/all C++ compilers on a range of operating systems. Its implementation can leverage off several non-trivial C/C++ libraries (including STLSoft, recls, Open-RJ, Boost. etc. etc.

But, relating this back to your earlier "Is D a wrapper for C" comment, it has a pluggable architecture. One can specify input and/or output filters as Perl/Python/Ruby/whatever-else-you-want scripts (maybe D script in the future??), or its own rules file syntax, or as separate executables, or as dynamic libraries. The dynamic libraries have a C-interface, of course, but use the Portable Vtables technique I describe in the book such that one can effectively share C++ classes across modules built with different compilers. There's no reason why one cannot write the plug-in executables or dynamic libraries in D, and I certainly plan to do that.

Anyway, here's the point. Some of the example executable/dynamic-library filters are written in C++. But they've been a total PITA to do so, compared with the filters I've written in Python/Perl/Ruby, as you'd expect: compare development times of several hours with about 15 minutes. But some C/C++ compilers have weird idiosynchracies with their command-lines (e.g. CodeWarrior requires a "-I-" _before_ any other "-I???") that means that scripting languages are less suitable than a compiled language. Given the fact that string manipulation is a dream in D, coupled with the fact that its got regexp built-in, means that it'll be my language of choice for those filters that are not amenable to scripting.

So, to me, D is the best language when the total, manic grunt of C++ is not required, but a less powerful language (e.g. scripting language, or one of the VM languages) is not suitable. (Imagine how slow it would be to compile a file with 10 different compilers if the input and output filtering was done by Java/.NET classes - what a joke!)

Anyway, if that's turned out to be a huge plug for my book, I'm sorry. It didn't turn out like that, but my attention is necessarily influenced at the moment. =P


The other major advantage of C++ over any other language at the moment is its support for high efficiency and generic programming. I expect D will catch up with C++, and perhaps even surpass it in this regard - and I intend to put in a big effort in the near future to that end! - but at the moment they don't compare.


</end of rant>

Cheers


-- 
Matthew Wilson

Author: "Imperfect C++", Addison-Wesley, 2004
    (http://www.imperfectcplusplus.com)
Contributing editor, C/C++ Users Journal
    (http://www.synesis.com.au/articles.html#columns)
Director, Synesis Software
    (www.synesis.com.au)
STLSoft moderator
    (http://www.stlsoft.org)

-----------------------------------------------------


July 10, 2004
"David Barrett" <dbarrett@quinthar.com> wrote in message news:ccphb7$1dsr$1@digitaldaemon.com...
> "Andy Friesen" <andy@ikagames.com> wrote in message news:ccp9ii$135u$1@digitaldaemon.com...
> > I think the pivotal aspect will be the tools.  I spent some time playing with MS's new C# Express beta, and the editor alone made a boring, crippled language easy, even fun, to write. (particularly the refactoring tools) Visual C++ pales in comparison, and the complexity of the language lends little hope for it ever catching up.
>
> Speaking of tools, I think a great D feature is it's ability to work with HTML seamlessly.  I'd like to see what an IDE could do with this.  Screw Doxygen -- just make the source code and the documentation the same thing! Embed UML state diagrams right into comments.  Create RSS feeds for file changes.  Who knows, but I think there are some cool possibilities that would be hard to match with other languages.

Can you give a 1-para synopsis of RSS for an old thickie?


July 11, 2004
Jarrett Billingsley wrote:

<snip>

> D is very C++ like, unsurprisingly.  it is an evolution of C++.  but how much of an evolution?
> 

<snip>

That's funny... I don't find D very similar to C++ at all.  About the only thing that they share extraordinarily in common is their C heritage.

I've never liked C++.  It may be a powerful and expressive language... but what a pain to work with. It seems that the reason that it has so many specialized tools these days is likely for the poor programmer's that need to make sense of convoluted c++ code (viusal IDE's, etc.)

Also the heavy use of pre-processor macros in C++ annoys me.  I've looked at several GUI toolkit's (eg, fox and wxWidget) and find that they all MUST use macros in order to make the messaging system work (MFC also did that too, IIRC).  Apparently C++ is significantly handicapped without the macros.  Go figure!  That's ugly, ugly, ugly.... and all in the name of power and flexibility.

I'll leave C++ to the intellectuals... or those that fancy themselvs as such.  If I'm going to devote my wee brain to learning a language, I'll try to stick to those that allow me apply a few more brain cells to the algorithm at hand.

Later,

John
July 11, 2004
John Reimer wrote:
> Jarrett Billingsley wrote:
> 
> <snip>
> 
>>D is very C++ like, unsurprisingly.  it is an evolution of C++.  but how
>>much of an evolution?
>>
> 
> 
> <snip>
> 
> That's funny... I don't find D very similar to C++ at all.  About the only
> thing that they share extraordinarily in common is their C heritage.  
> 
> I've never liked C++.  It may be a powerful and expressive language... but
> what a pain to work with. It seems that the reason that it has so many
> specialized tools these days is likely for the poor programmer's that need
> to make sense of convoluted c++ code (viusal IDE's, etc.) 
> 
> Also the heavy use of pre-processor macros in C++ annoys me.  I've looked at
> several GUI toolkit's (eg, fox and wxWidget) and find that they all MUST
> use macros in order to make the messaging system work (MFC also did that
> too, IIRC).  Apparently C++ is significantly handicapped without the
> macros.  Go figure!  That's ugly, ugly, ugly.... and all in the name of
> power and flexibility.
> 
> I'll leave C++ to the intellectuals... or those that fancy themselvs as
> such.  If I'm going to devote my wee brain to learning a language, I'll try
> to stick to those that allow me apply a few more brain cells to the
> algorithm at hand.
> 
> Later,
> 
> John


I agree.
D is so much easier to learn and use, in my eye's that is what makes it so much better then C++.
Many C++ worshippers might not want to change to D.
But for newly started programmers and for the people that always hated/disliked C++, D might turn out to become their favorate choice.
Time will tell, but i am a beleiver :)
« First   ‹ Prev
1 2