On Tue, 24 Jul 2018, Allin Cottrell wrote:
On Tue, 24 Jul 2018, Sven Schreiber wrote:
> Am 24.07.2018 um 17:27 schrieb Allin Cottrell:
>>
>> Under the proposed scheme NAs (= nans) would not turn into zeros on
>> multiplication by zero -- but the misszero() function would still be
>> available to do that job.
>
> OK, but doesn't this consitute a counterexample to the claim of full
> backward compatibility?
Yes, you're right. I hadn't thought that through all the way.
One more thought on this point. We _could_, if we wanted to,
preserve the current "NA * 0 = 0" rule for arithmetic on scalars and
series in its semi-broken form (meaning, it applies without regard
to whether the NAs are "real missing values" or converted nans or
infinities).
That would not be computationally costly, and it would be maximally
backward-compatible, but I think my preference is to break
compatibility in that one respect, because what we're doing now is
not really defensible. One point I'd forgotten is that comparable
software doesn't support "NA * 0 = 0". Not that we want to slavishly
follow R, but NA * 0 = NA there.
Allin