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:

I favour code maintenance. I don't like fixing bugs only to introduce a whole bunch of new ones that are hard to find. This is probably my largest concern when it comes to writing code.


But once again, if you fix a bug by introducing a new name, then you never
introduce a new "bug", simply instances of illegalities that are trivially
fixable (you can even write a trivial tool to fix them if you really find
it that hard). So they are not "hard to find", since they generate clear
diagnostics, and they are not "hard to fix".

I argue that it is not trivially fixable. In the case of a third party library, it is virtually impossible to guarentee that introducing a new member will not break any clients of the library.

This is why I like "orthogonality" of code - the act of making a change in one facet does not introduce changes in another. The "with" concept breaks orthogonality in arbitrary ways.

Forthwith remove with prejudice. (sorry)

G


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