Skip to content

ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1

1 message · Hugh Parsonage

#
I would add my support for the change.
== 'y'` -- rather than inherits(x, 'y') or is.y -- is probably going to be
the major source of new warnings. So perhaps in the NEWS item it could be
noted as a clue for developers encountering nascent warnings.

Of course `if (class(x) == 'y')` already throws a warning, just not `if
(class(x) == 'y' && TRUE)`.
On Thu, 30 Aug 2018 at 21:09 Emil Bode <emil.bode at dans.knaw.nl> wrote: