>>Java packages are used to access code in another directory. So if a Java
programmer wants his class to be used by others, they pretty much have to
declare it as part of a package. That's why Java packages are used all over
the place.
That's not true. Java packages were designed not only for preventing
name clashes but also as an encapsulation mechanism. You really don't
have to provide a library in package but you can also code your
component / library in global package and still anyone can use it. Just
that there will be more probability of name clash. Since this feature
is not there all in C++ , others have designed their own technology or
methodology to achieve such things. One example of such a technology is
COM/DCOM. There was no reason to design such a technology but because
there is no such feature in C++.
C++ namespaces are used only to resolve name collisions. So in C++,
programmers don't need namespaces unless they find themselves wanting to use
two classes with the same name. This is a pretty rare situation.
Again I strongly disagree with this. Don't you feel that integrating
two totally different components , written by totally different
programmers, who don't know at all that these two components can / will
be integrated, is really painful. My experience tells that most of the
times you definitely have to modify the components., untill and unless
those components have been designed keeping in mind that they can be
used in a plug and play kind of environment.
Before anyone of you say that some syntax /logic for the design in some
language is not right , you must have some really good programming
experience with that language. I have been programming with various
languages like C# and Java precisely. There are certain features of
these languages which are really strong which I feel can also be
incorporated into C++. Though I agree both of these languages are sort
of conglomerate of best features of ADA/C++ and other object oriented
languages, but still they have been designed very elegantly. Its a
breeze programming with these languages. If these languages can adapt
themselves with the times, then why the hell C++ cannot adopt some
novel features / syntax of these languages. Have we really closed our
eyes and ears for any such criticism / rationalism ?
Any comments / criticism is welcome.
Anyways thanks for you reply,
Divick