This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: c++ "with" keyword
- From: dewar at gnat dot com (Robert Dewar)
- To: dewar at gnat dot com, gmariani at chaincast dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 4 Jan 2003 15:58:39 -0500 (EST)
- Subject: Re: c++ "with" keyword
> 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.
It may certainly break any clients who use the WITH feature, but that is
their choice. Anyone who uses WITH on a 3rd party library is accepting
that updates to the library that add names may possibly cause some
illegalities, just as someone using USE in Ada takes this "risk".
But the user of the library knows immediately that the problem has
arisen and can fix it trivially.
> 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.
Well I dislike the word orthogonal being used in this sloppy sense, but I
know what you mean. This is only an informal concept. Any change to a library
may require changes in client code (e.g. perhaps the library gets 10 words
bigger in an embedded environment with only 9 words free). The issue is
whether WITH adds substantially to this problem. I don't think this is
the case.
Again, I think you are arguing the weak point of the case against WITH. The
strong argument is that the renaming is good enough.