This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: c++ "with" keyword
- From: Gianni Mariani <gmariani at chaincast dot com>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 04 Jan 2003 09:59:02 -0800
- Subject: Re: c++ "with" keyword
- Organization: Chaincast, Inc
- References: <20030104173536.3331FF2DFD@nile.gnat.com>
- Reply-to: gmariani at chaincast dot com
Robert Dewar wrote:
Someone innocently added a new member and completly changed the
behaviour of the code. For code maintainability, I'd suggest that this
would cause more difficult to discover problems than would be merited.
This is a red herring. Any reasonable definition of the with feature would
make it impossible for the addition of a member name to change the meaning
of existing code (yes, it might make it illegal, but that's reaosnable).
I think you missed the point.
The fact that this can happen - even if you make it illegal, means more
maintenance. Using it from libraries also means that simply adding a
member to a library could cause untold number of users to that library
have compilation errors.
Besides, this was a "real" problem with a Pascal program I wrote many 20
years ago and why I never used the 'with' keyword since.