In case we would know that certain methods had no side effects (and are
not called because of their side effects), ...

But at the moment we don't know and therefore we can't warn for every
method.

Am 10.01.2015 um 15:50 schrieb Gabor Szabo:
> I keep writing code like this:
>
> $str.substr(/regex/, 'replaement)
>
> when I should write
>
> $str.=substr(/regex/, 'replaement)
>
>
> The former will *return* the replaced string to the void but not
> change it.
>
> I don't know if the above can be ever useful, but maybe this kind of
> constructs should warn. Or maybe there should be a flag that will turn
> on warnings  for such cases.
>
> Or maybe there already is, I just don't know about it?
>
> Gabor
>
>

Reply via email to