Re: [Cppunit-devel] toString() v.s. getName()
Brought to you by:
blep
|
From: Baptiste L. <gai...@fr...> - 2001-07-10 14:37:02
|
Quoting "Steve M. Robbins" <ste...@vi...>:
> Hi,
>
> On Wed, Jun 20, 2001 at 08:42:04AM +0200, Baptiste Lepilleur wrote:
> > Conclusion: ditch either toString() or getName(). I find that
> getName() as a
> > more intention revealing name ;-)
>
> I agree with your conclusion. And I volunteer to do it (remove
> toString).
>
> My plan of attack is as follows:
>
> 1. Remove all use of toString() in the library.
> 2. Document toString() as deprecated in all classes that define it.
> 3. Replace all toString() implementations with "return getName()".
> 4. After a respectable number of public releases have been made,
> remove all toString() methods.
>
> Optionally, we could replace toString() methods with
>
> toString() {
> std::cerr << "Replace toString() with getName()." << endl;
> return getName();
> }
(note that this is of no use for Windows user in GUI mode).
>
> ... or would that be too obnoxious? ;-)
I wouldn't even bother with point (2), (3) and (4). The next release will
break so many existing stuffs, and this one is really a minor detail (toString
isn't even used by CppUnit).
CppUnit status is "pre-alpha", which to me means "might be working some, but
don't trust it". Seriously, I thing that releasing a list of change since 1.5.5
is enough. People using CppUnit at pre-alpha stage for serious work should be
following this list (or they like to live very dangerously).
So, if someone as problem with toString() methods removal, speak up now ;-)
Concerning deprecation (no use for now, but might be for later), we could set
up "compatibility" flag (just like we did for assert). Those flag would be up
for a few releases before being removed (so you could have the compiler
locating all the usages of toString() by disabling support for deprecated
stuff). But I don't think it's worth bothering with deprecation support until
we reach alpha or beta stage (does somebody have a clear definition of what
each stage is supposed to be ?).
Documentation how to do the transition from one version to another should be
enough for now (we should start a document for that).
Baptiste.
---
Baptiste Lepilleur <gai...@fr...>
http://gaiacrtn.free.fr/index.html
Language: English, French
|