D - more or less power than C++?
Walter Bright
newshound at digitalmars.com
Sat Mar 4 10:44:17 PST 2006
"Bruno Medeiros" <daiphoenixNO at SPAMlycos.com> wrote in message
news:duc1g3$1936$1 at digitaldaemon.com...
> But this question is a bit biased and misframed.
Of course, but that is the point of it. I wanted to hear what the biases and
misframes are, so they can be dealt with. I want to know the source of the
perception that "C++ is more powerful."
> Java is an extreme example of this, where plainness and "shepherdness" are
> taken to an extreme, and I hear people complain about it all the time (me
> inclusive), but I also recognize that there are some advantages to this
> plainness.
> _I know_, when reading Java code, that the code isn't doing some weird,
> obscure, or just unclear thing, because Java is that plain. And that is
> something I didn't immediately realize after learning/working with Java,
> but only recently came to value and understand (and I think it might very
> well be one of the things that were responsible for Java's popularity).
Right. I discovered this too. For the lack of an existing term, I called
this "inspectability", which is defined as being able to tell what code is
doing *without* needing to examine declarations or header files. For
example, what are the various things that f(x) can mean in C++? (There are
quite a few!) Code is not inspectable in C++. Any piece of code in C++, you
have essentially no reliable touchstone as to what it is doing without
examining all the header files.
(This is also one big reason why D does not have user definable tokens or
syntax, it makes code completely uninspectable.)
> Now, I'm not saying (nor I think) that D should be like Java in that
> regard, but I think it's something we should keep in mind when trying to
> shove every feature of other language, especially C++, into D.
You're quite right, and inspectability has been a big consideration. It's
another reason why I dislike overloading assignment (as you mention).
More information about the Digitalmars-d
mailing list