verbose terminate() on by default, pass 2

Ulrich Drepper drepper@redhat.com
Wed Dec 25 01:22:00 GMT 2002


Gabriel Dos Reis wrote:

>   01. Pointers and references
>     char* p = "flop";
>     char& c = *p;
>        -NOT-
>     char *p = "flop";  // wrong
>     char &c = *p;      // wrong
> 
>       Reason: In C++, definitions are mixed with executable code.  Here,       
>               p is being initialized, not *p.  This is near-universal
>               practice among C++ programmers; it is normal for C hackers
>               to switch spontaneously as they gain experience.

That's crap and an insult to every "C hacker" and those who really
understand the issue.

   char* p = "flop";

is wrong since the derefence does *not* belong to the type but instead
the variable as can be clearly seen in

   char* p, q;

Nathan was never ever able to justify the wrong C++ style sufficiently
and simply brushed over the issue by saying "then don't do it".  This is
just one more example of the arrogance of the C++ people who a) cannot
use what has been practice in the C world, and b) admit that they are wrong.

-- 
--------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------



More information about the Libstdc++ mailing list