January 12, 2004
In article <btte7f$2t4t$1@digitaldaemon.com>, Andy Friesen says...
>
The recent posts on this thread are getting
informative but there another thing that must
be said:

Superman can beat Batman anytime!

Ant
(sorry - coulnd't resist)


January 12, 2004
In article <btsa5r$11rk$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?

Did someone mention operator overloading for freestanding functions? ;)

(About which, by the way, I'm sure there is some kind of solution that is so simple that after discovering it everybody thinks "Now why on earth didn't we think about *that*?")

-Antti
January 12, 2004
I think C++ has enough add-on s as it is, it starts to feel like a bunch of hacks.  Now they're just stuffing it full of everything they can find.

IMO starting a new language was the perfect strategy.  D is so clean , to me being able to express myself clearly and consistently without jumping through hurdles qualifies D as the most powerful ( currently ).

I think when honest C++ users start with D ( there is always those who
cannot let go ), their thoughts well be along the line of :
"Its about damn time."

C

"Walter" <walter@digitalmars.com> wrote in message news:btti8m$22d$2@digitaldaemon.com...
>
> "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++.
>
>


January 12, 2004
http://hp.vector.co.jp/authors/VA028375/contents/D_windows.h.html

Can we PLEASE execpt this is at the standard ?  These are generated by a perl script , so updating would not be a problem , and I have yet to find a function thats not covered by this library.  I've been using for months with no problems at all!

C


"Mark Arts" <Mark_member@pathlink.com> wrote in message news:bttpa0$fp7$1@digitaldaemon.com...
> >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?
>
> C++ supports C headers natively :-) D doesn't, and this is especially
annoying
> while writing programs using the Windows API. Indeed, there is a hint of
some
> Win32-API headers in the phobos library, but they are not nearly enough to
make
> a useful program. Also, a lot of functions that are supported by D have an
A
> attached to them. Of course, this has to do with the unicode definitions
of C++,
> but it is not very handy to have to look up the D definitions every time
you
> want to use a function. Or, for that matter, to have to export a lot of functions myself to support even the most basic things as posting
messages, and
> adressing dialog items.
> So if you define powerful as being able to easily make user-friendly Win32
apps,
> then C++ is way more powerful.
> As for my wishlist, you can guess: I would like the full Win32-API headers
when
> you download D, and aliased without the A's. This would also cause people
not to
> choose immediately for C++ programming an application because D can't, or
only
> after a lot of typing.
>
>


January 12, 2004
>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?
>
Nested functions is a real plus für D. Inline assmbly isn't realy (at least for
me). Most C++ compilers have this ability, too. And if I use such a feature I
become somewhat unportable so it doesn't matter that I use a compiler specific
extension.
For me it's only important that my programm runs on a Windows-PC and A MacOS X
Mac.
I use stuff like template-templates from time to time. This is a VERY powerfull
thing. And AFAIK only C++ supports this.

Anyway D's generic ability are much better in the new version. This is the first
version of D that I realy like.
Maybe version 1.0 will be a real alternative.
BTW, what about mixins? Are they alredy implemented (seen anything about them).
If not, are they still planed to be implemented?


January 12, 2004
>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.

inline doesn't force the compiler for doing inline expanding. Anyway inline has another effect here. If you definie the function inline in a header you don't violate the ODR.


January 12, 2004
>> 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.
>
>All new languages have a major uphill battle with that. And I believe 2004 is the year in which we'll get solidly into the game on that.
>
Than you have to do a lot. Do you think you can do something that can be compaired to .NET? This is the libray that comes with a new language (C#) today. Javas library isn't bad as well. I think it will be hard.


January 12, 2004
>C++ supports C headers natively :-) D doesn't, and this is especially annoying while writing programs using the Windows API. Indeed, there is a hint of some Win32-API headers in the phobos library, but they are not nearly enough to make a useful program.
Most Object PASCLA, all BASICs I know, Java, C#, ... don't have the ability to inlcude C headers nativaly, but I AM able to make usefull programs.

>Also, a lot of functions that are supported by D have an A
>attached to them. Of course, this has to do with the unicode definitions of C++,
>but it is not very handy to have to look up the D definitions every time you
>want to use a function. Or, for that matter, to have to export a lot of
>functions myself to support even the most basic things as posting messages, and
>adressing dialog items.
>So if you define powerful as being able to easily make user-friendly Win32 apps,
>then C++ is way more powerful.

Using .NET is much more convenient. So all the .Net-languages (C#, managed C++,
VB.NET, Eiffel (however the extensionis called), ...) are VERY user-friendly in
making Win32 apps.

>As for my wishlist, you can guess: I would like the full Win32-API headers when you download D, and aliased without the A's. This would also cause people not to choose immediately for C++ programming an application because D can't, or only after a lot of typing.
>
I wouldn't like this very much. Wrapping them or what ever or a way to access the .NET framework (which seems to be impossible if D doesn't become a language that is compiled to MSIL) would be what I'd like to see.


January 12, 2004
>Indeed it does. But I read here on the forum that people want this language to be popular. Don't get me wrong, I totally agree with that. But to become widely used, doesn't it have to have a large library support? Either written in D, of which there are almost none, or by using e.g. C(++) libraries easily. And I don't think having to export every function in a library is easy. Do you?
>
But why C(++)? There are big librarys written in Fortran as well.


January 12, 2004
>http://hp.vector.co.jp/authors/VA028375/contents/D_windows.h.html
>
>Can we PLEASE execpt this is at the standard ?  These are generated by a perl script , so updating would not be a problem , and I have yet to find a function thats not covered by this library.  I've been using for months with no problems at all!
>
>C
Wouldn't this be VERY stupid? Can I use them using Linux: No. When there is a Mac port (I hope there will), would I be able to use it: No. But hey, you suggest it as part of the standard, but I can't use it on most of the platforms, that will hopefully be supported in the future (and partitaly allready are (Linux)).