2 ms·
a * sin(x) + b * cos (-x) should have been a * sin(x) - b * cos (x) type isn't worth a damn here. In a lot of situations you have related values of exactl
by kazinator 4y ago
a * sin(x) + b * cos (-x)
should have been
a * sin(x) - b * cos (x)
type isn't worth a damn here.
In a lot of situations you have related values of exactly the same type: floats, strings, integers, Widget objects, which get mixed up.
A warning about variable shadowing or unused variable can be worth more than a type diagnostic. E.g. suppose
a * sin(x) - a * cos (x)
is written by mistake. If that causes b to be an unused local variable, we get a valuable diagnostic.