This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++ "with" keyword


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.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]