January 11, 2004
In article <btrvl0$h33$1@digitaldaemon.com>, Matthias Becker says...
>
>>D 1.0 will probably be the most powerful 1.0 language ever released!
>
>There is no C++-Standard before C++98. So this is version 1.0 and it's still more powerfull that D.

You're mixing things. It'll be years before we get to ISO-D 1.0. That may actually be more powerful than e.g. C++98. At least we hope, and believe it will be.

But a v1.0 here is just a spec, and as such comparable to C++ at Stroustrup's Cfront days.



January 11, 2004
"Matthias Becker" <Matthias_member@pathlink.com> wrote in message news:btrvl0$h33$1@digitaldaemon.com...
> >I think it's pretty close. I'm finishing up what I hope will be the last
bit
> >of new features, and then it'll be bug fixing. D 1.0 will probably be the most powerful 1.0 language ever released!
>
> There is no C++-Standard before C++98. So this is version 1.0 and it's
still
> more powerfull that D.

D has many very powerful features that C++ does not have, such as nested functions and inline assembly. C++ has features that D does not have, such as a preprocessor and virtual base classes. While no definitive answer is possible since eventually one starts comparing apples to oranges, what in your view makes C++ more powerful than D?


January 11, 2004
Walter wrote:
> "Matthias Becker" <Matthias_member@pathlink.com> wrote in message
> news:btrvl0$h33$1@digitaldaemon.com...
> 
>>>I think it's pretty close. I'm finishing up what I hope will be the last
> 
> bit
> 
>>>of new features, and then it'll be bug fixing. D 1.0 will probably be the
>>>most powerful 1.0 language ever released!
>>
>>There is no C++-Standard before C++98. So this is version 1.0 and it's
> 
> still
> 
>>more powerfull that D.
> 
> 
> D has many very powerful features that C++ does not have, such as nested
> functions and inline assembly. C++ has features that D does not have, such
> as a preprocessor and virtual base classes. While no definitive answer is
> possible since eventually one starts comparing apples to oranges, what in
> your view makes C++ more powerful than D?

The fact that C++ template functions can infer their template arguments makes it really easy to express certain things, however much grief it causes the compiler.  Also, C++ interfaces with C++ quite well. :)

I don't think the preprocessor counts: there's nothing at all stopping someone from running cpp through some D source before giving it to the D compiler.  The only difference is that not using a preprocessor with C++ is complete suicide. (which isn't exactly a strong point)

I think that's about it.

C++'s real strength is that it's so prolific.  There are tons of tools and libraries written with and for C++, as well as people used to thinking in terms of it.

 -- andy
January 11, 2004
"Andy Friesen" <andy@ikagames.com> wrote in message news:btscdc$15go$1@digitaldaemon.com...
> Walter wrote:
> >>There is no C++-Standard before C++98. So this is version 1.0 and it's
> > still
> >>more powerfull that D.
> >
> > D has many very powerful features that C++ does not have, such as nested functions and inline assembly. C++ has features that D does not have,
such
> > as a preprocessor and virtual base classes. While no definitive answer
is
> > possible since eventually one starts comparing apples to oranges, what
in
> > your view makes C++ more powerful than D?
>
> The fact that C++ template functions can infer their template arguments makes it really easy to express certain things, however much grief it causes the compiler.

Given the vast array of features in both languages, is that really an overriding feature?

> Also, C++ interfaces with C++ quite well. :)

That's cheating <g>.

> I don't think the preprocessor counts: there's nothing at all stopping someone from running cpp through some D source before giving it to the D compiler.

True (and D is specifically accommodating to doing that), but technically speaking, using addon tools is not part of the language itself.

> C++'s real strength is that it's so prolific.  There are tons of tools and libraries written with and for C++, as well as people used to thinking in terms of it.

Undeniably, C++ is rich in books, libraries, user base, articles written about it, etc.


January 12, 2004
Walter wrote:
> "Andy Friesen" <andy@ikagames.com> wrote in message
> news:btscdc$15go$1@digitaldaemon.com...
> 
>>The fact that C++ template functions can infer their template arguments
>>makes it really easy to express certain things, however much grief it
>>causes the compiler.
> 
> Given the vast array of features in both languages, is that really an
> overriding feature?

I'm not sure.  I myself can live without it, but you have to look at the sorts of things boost manages to pull off.  Not the least of which is using exactly this to implement some amazingly convincing (though somewhat brittle) lambda forms.  (basically, it involves a template object that appends operations to itself when you apply an operator to it)

>>Also, C++ interfaces with C++ quite well. :)
> 
> That's cheating <g>.

That's the trouble with getting in a fight with The Man.  He never fights fair. ;)

 -- andy
January 12, 2004
"Andy Friesen" <andy@ikagames.com> wrote in message news:btstea$210m$1@digitaldaemon.com...
> Walter wrote:
> > "Andy Friesen" <andy@ikagames.com> wrote in message news:btscdc$15go$1@digitaldaemon.com...
> >>The fact that C++ template functions can infer their template arguments makes it really easy to express certain things, however much grief it causes the compiler.
> > Given the vast array of features in both languages, is that really an overriding feature?
> I'm not sure.  I myself can live without it, but you have to look at the sorts of things boost manages to pull off.  Not the least of which is using exactly this to implement some amazingly convincing (though somewhat brittle) lambda forms.  (basically, it involves a template object that appends operations to itself when you apply an operator to it)

Sure, but D offers direct support for lambda forms! I've seen some of the C++ lambda libraries, and while they are technically amazing, they are a little past the bleeding edge for production use because, as you say, they are brittle.

Perhaps we disagree on what power means. I interpret it as being able to get what I want done in a simple, straightforward manner. If something can only be done as a complex, brittle construction loaded with special rules, I'm going to suggest that reveals a weakness in the language.

For a simpler example, let's take inline functions. I can do it like this:

    inline int max(int a, int b) { return a < b ? b : a; }

or I can say, use the powerful preprocessor:

    #define max(a,b) ((a) < (b) ? (b) : (a))

The latter is brittle and loaded with special rules and traps for the unwary. Therefore I think the former is more powerful.


January 12, 2004
Walter wrote:
> Sure, but D offers direct support for lambda forms! I've seen some of the
> C++ lambda libraries, and while they are technically amazing, they are a
> little past the bleeding edge for production use because, as you say, they
> are brittle.
> 
> Perhaps we disagree on what power means. I interpret it as being able to get
> what I want done in a simple, straightforward manner. If something can only
> be done as a complex, brittle construction loaded with special rules, I'm
> going to suggest that reveals a weakness in the language.

Absolutely.  I just have this thing for playing the devil's advocate sometimes. :)

What I meant was that lambdas weren't even supposed to be part of the language, but the existing constructs (almost, heh) allow it to happen anyway.  C++ is impressive in that it's possible to extend the language from within itself in this way, and to make those extensions (sometimes) appear completely transparent, or nearly so.

To be honest, I'm not at all convinced it's worth the tradeoff, but there are those who disagree with me.

 -- andy
January 12, 2004
"Andy Friesen" <andy@ikagames.com> wrote in message news:btte7f$2t4t$1@digitaldaemon.com...
> Walter wrote:
> > Sure, but D offers direct support for lambda forms! I've seen some of
the
> > C++ lambda libraries, and while they are technically amazing, they are a little past the bleeding edge for production use because, as you say,
they
> > are brittle.
> >
> > Perhaps we disagree on what power means. I interpret it as being able to
get
> > what I want done in a simple, straightforward manner. If something can
only
> > be done as a complex, brittle construction loaded with special rules,
I'm
> > going to suggest that reveals a weakness in the language.
>
> Absolutely.  I just have this thing for playing the devil's advocate sometimes. :)
>
> What I meant was that lambdas weren't even supposed to be part of the language, but the existing constructs (almost, heh) allow it to happen anyway.  C++ is impressive in that it's possible to extend the language from within itself in this way, and to make those extensions (sometimes) appear completely transparent, or nearly so.
>
> To be honest, I'm not at all convinced it's worth the tradeoff, but there are those who disagree with me.

Surely it depends on a case-by-case basis. If it's efficient, and it's widely supported, and it does not require an inscrutable mass of template and/or macro arcana, then I would say it is worth it. If it fails on any of those criteria, I would say it's not worth it.



January 12, 2004
In article <btt3h3$2aqu$1@digitaldaemon.com>, Walter says...
>
>
>"Andy Friesen" <andy@ikagames.com> wrote in message news:btstea$210m$1@digitaldaemon.com...
>> Walter wrote:
>> > "Andy Friesen" <andy@ikagames.com> wrote in message

I think that discussing the power of a language (or, especially
the relative power of languages), has the same inherent problems
as discussing Quality. The economist academia have for years tried
to come up with an unambiguous, quantifiable, definition for quality,
unsuccessfully.

Since the comparison between any two languages ultimately reduces to comparing apples to oranges, we should at least temporarily define what power means.

While doing that, we should also remember that "in reality" power is a street concept that is measured mostly unconsciously. I assume this includes, in addition to factual language differences, things like usability and applicability for the end user, which includes the easily accessible libraries, number and quality of tools, whether you can ask the guy in the next cubicle for help, etc., etc.

The Street Power is what decides, with the masses, at least, which language will be used.

Here, I think, what counts, are those properties "we can do something about" in the next 3 months? (For C++ in this discussion Power should exclude supporting programs, such as IDE, lint, and others.)

>(...) what power means. I interpret it as being able to get
>what I want done in a simple, straightforward manner. If something can only
>be done as a complex, brittle construction loaded with special rules, I'm
>going to suggest that reveals a weakness in the language.

Agreed.


January 12, 2004
"Andy Friesen" <andy@ikagames.com> wrote in message news:btte7f$2t4t$1@digitaldaemon.com...
> To be honest, I'm not at all convinced it's worth the tradeoff, but there are those who disagree with me.

Right. I've been taken to task by some C++ experts for designing a whole new language rather than working to add more generic programming power into C++.