[Swan-dev] why there were useless assignments
Paul Wouters
paul at nohats.ca
Thu Dec 6 13:43:43 UTC 2018
On Wed, 5 Dec 2018, D. Hugh Redelmeier wrote:
> In each of these cases, the abstraction / invariant required these
> assignments.
>
> Recommendation: restore these assignments.
If people add things in a chain without reading through the chain to
realise this, we are lost already?
> - lint-like programs complain about a useless assignment (that's why I
> previously added an explanatory comment to each of these assignments)
That didn't prevent coverity from complaining, which was the reason I
removed them.
Note the loggedit was particularly useless, as it was a chained if else
loop so even extending it would have made the whole thing useless.
So my preference is to not restore these.
Paul
More information about the Swan-dev
mailing list