* Moritz Lenz <
mor...@faui2k3.org> [2013-05-06 20:35]:
After thinking about this for a long time, I went back to the didactic
purpose of this paragraph. I think the idea should be to help a novice
“think Perl” sooner. This paragraph helps by making explicit an abstract
design principle that isn’t really spelled out in the following concrete
information.
Is it the goal here to instil encyclopædic knowledge of Perl arcana?
I don’t think so.
Is it useful to alert the novice to exceptions that cause problems?
I think so.
In these terms, `x` and `reverse` are neither truly exceptions nor do
they cause problems. (OK, `reverse` is slightly slippery, but the
problem it does cause is of a different kind entirely compared to the
bitwise operators’, and an altogether smaller one.)
Didactically it therefore seems best to me to consider those two as
distracting detail, and leave them out entirely, while expanding further
on the ones that do cause problems.
So I would write something like this:
Beware of some notable unfortunate exceptions though: the bitwise
operators C<&>, C<|> and C<^> will treat their operands as either
strings I<or> numbers, depending on how their values entered the
program and what previous operations were performed on them. This
can lead to subtle bugs unless you convert operands to a consistent
form before passing them to such an operator.
This also goes beyond just giving the reader information, to giving them
a brief idea of what it means for them.