K
Kai-Uwe Bux
Grizlyk said:I want to say, that i think that compiler can do static type checking, and
const_cast<> allow to compiler to do static type checking.
If you can not take my explanation, make your own explanation, but it must
be explanaiton, something lager than "it can not because can not".
If it was clear _what_ you want explained, I would be happy to provide an
explanation to the best of my ability. However, what a compiler for a
hypothetical language where
T heap*
and
T readonly code*
is valid syntax could do at compile time or not, is something I cannot
explain. I have no such compiler and I do not know any such language.
I think pepole who are not close to standard can have own opinion about
C++ memory usage .
Maybe. However, programs based upon those opinions detached from the
standard run a high risk of exhibiting undefined behavior.
All in all, I have the feeling that we are caught in some serious
misunderstanding about the topic. I just dropped in to explain the rational
behind the decision of the standard to treat
void f ( int );
and
void f ( const int );
as identical function signatures.
You, on the other hand, seem to be concerned with an overhaul of C++ of much
larger scale that would introduce seven(!) new keywords. I have no basis to
form any opinion on that other than that I do not really see which problem
you are trying to solve. If you put together a consistent proposal for
changing the standard with a clear exposition of the current shortcomings
of C++ that you are trying to fix, it would be much easier for me (and
presumably anybody else) to say something meaningfull about it. (If you
decide to do so, it might be good to start a new thread. It also might be
good to put it into comp.std.c++.)
Sorry for not being helpful
and best regards
Kai-Uwe Bux