I think that "strongly typed" and "type safety" is not
same thing? Im not native English speaker, so please clarify.
They are at least strongly related. You have type-safety in C++
in the sense that as long as you use C++'s type system, you can
be absolutely sure about a symbol's type. Casting to/from void*
explicitely turns the type system off temporarily, and yes, this
means that you loose type-safety. But you do not just loose it,
in fact you actively throw it away. Doing that and then saying
it was never there is non-sense, and that is what I meant.
Only way to interface other C compiler or other language
is through C. C++ doesn't provide means to make C++
library and provide C++ interface. You have to use C
interface.
I do not know if I understand your statement correctly. You seem
to say that it were not possible to write software libraries in
pure C++. Which is wrong. Just have a look at rather big
frameworks like wxWidgets or Qt. Object-oriented C++, not C.
It is tradition rather than a technical necessity for other
languages to provide C interfaces rather that C++. That, and
it's often much simpler to do. Add the fact that if you provide
a C interface, you provide a "common demoninator" for almost
every other language on the planet, because they more or less
all have C interoperability features, too. So if you provide a C
interface, the Java people can use it as well as Python
programmers, apart from 'just' C programmers. That said, there
are other possibilities (e.g., SWIG).
Regards,
Robert