Re: [libxml++] Document interface



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le Vendredi 26 Septembre 2003 15:28, Murray Cumming Comneon com a écrit :
> > From: Christophe de VIENNE [mailto:cdevienne alphacent com]
> > While working on Document, I was wondering why the
> > write_to_xxx functions are
> > virtual.
>
> Probably because I make methods virtual by default, because I don't pretend
> to know who needs to subclass and override.
>

That make sense. But shouldn't other functions be virtual too ? I mean this 
argument is true for the other interface I think.

At least for write_to_stream, I'd prefer to do the following :
remove virtual for write_to_stream and write_to_stream_formatted, and have it 
only for do_write_to_stream. This is cleaner I think.
And for interface consistency we should do it also for the other write_to 
functions.

> > I don't think this is needed.
> > Unless someone has some arguments against, I want to removed
> > the virtual.
> > Any comment ?
>
> I would call this optimisation without any proof that it's necessary.
>

I prefer to call it interface consistence :-)


Cheers,

Christophe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/dEfgB+sU3TyOQjARAlUsAKC+xFSjQZYBBTdrMnp0uXA345xM8gCdHpfF
84tmdoUIpNe3hewOL1vXyvo=
=3Ouq
-----END PGP SIGNATURE-----





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]