Re: Microsoft & GNU compiler 2 :)
From: Jason Winnebeck (gillius_at_mail.rit.nspam.edu)
Date: 07/19/04
- Next message: Jason Winnebeck: "Re: delete iterator inside while loop"
- Previous message: Manfred Eckschlager: "Sockets and filebuf with msvc 2003"
- In reply to: Simon Trew: "Re: Microsoft & GNU compiler 2 :)"
- Next in thread: tom_usenet: "Re: Microsoft & GNU compiler 2 :)"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Jul 2004 08:13:53 -0400
Simon Trew wrote:
> "Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@mvps.org.nospam>
> wrote in message news:eSsTPUaaEHA.3692@TK2MSFTNGP09.phx.gbl...
>
>><quote>
>>I no longer consider this
>>argument conclusive (if I ever did), but the decision has proven useful in
>>that it allows programmers to add and remove public and private
>>specifications during debugging without quietly changing the meaning of
>>programs.
>>
>></quote>
>
>
> But it doesn't. If you add a private variable to the base class (X) then the
> derived class (XX) suddenly can't see the global variable.
>
>
I think what Carl meant was if you make a public variable private, the
derived class won't silently use the global variable by the same name.
Meaning there is a compiler error, instead of it "quietly changing the
meaning" of the program to use the global. What I take from that is to
say that getting the compiler error and seeing that you forgot to
change/remove the reference is better than it compiling and accessing a
variable one did not intend.
Jason
- Next message: Jason Winnebeck: "Re: delete iterator inside while loop"
- Previous message: Manfred Eckschlager: "Sockets and filebuf with msvc 2003"
- In reply to: Simon Trew: "Re: Microsoft & GNU compiler 2 :)"
- Next in thread: tom_usenet: "Re: Microsoft & GNU compiler 2 :)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|