Casey R. Tweten writes:
> Ok, consider allowing:
> 
>   $a = length @b;
> 
> to DWIM, however, when running with warnings, warn the user that C<scalar> is
> what they really want.
> 
> Just thowing that out there.

Good idea, but I think it's a bad move to turn warnings into style
guides.  Warnings should point out things that have unexpected
consequences ("you seemed to think that value was defined, but it
wasn't", "that parenthesis after the function name is interpreted as
starting the argument list, but you put whitespace between the
function name and the parenthesis--you're not thinking the parentheses
are giving you a term in a larger expression, are you?").  They should
be things that you pay attention to because your program is probably
wrong.

Turning Perl into a nagging harpie means that the really important
warnings will be ignored.

This line of thinking brought to you by Mark-Jason's excellent talk
on data typing.

Nat

Reply via email to