Subject: Re: [boost] [variant2] Review
From: Jan Herrmann (jherrmann79_at_[hidden])
Date: 2019-04-17 13:37:38
Am 16.04.2019 um 20:23 schrieb Peter Dimov via Boost:
> Phil Endecott wrote:
>> I believe it's not reasonable or realistic to ask Peter to refactor
>> his code to the extent that e.g. Robert suggests.Â But it would be
>> good, as Jan suggests, to make it easier to build alternative
>> variants by re-using the "uncontroversial" parts of the Variant2
>> code.Â Peter, what do you think about this?Â I'm not suggesting that
>> you explicitly make the various internal components (as listed by
>> Jan) public interfaces, with docs etc., but just add enough comments
>> for others to be able to work with it and perhaps break it into
>> multiple files.
> Implementation details are just that, implementation details; I prefer
> to be able to refactor and change them at will, as long as the public
> interface is unaffected. Encouraging people to use and depend on them
> is at minimum a commitment that they will not change, and that
> commitment would very likely need to be backed by unit tests.
Even in cases these implementation details will remain private, unit
tests are a good thing do document the internal interface. They show
which assertions the author made. In case tests fail it is obvious some
of these assertions are vialated. It is good to rethink whether these
test are still needed or the change may introduce new bugs. Furthermore
in case of maintainer change more (and simple) tests can be useful.
In addition I think the basic components will be quite stable and could
be part of the public interface to be reused.
Regards Jan Herrmann
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk