From: Ricardo Signes <perl.p5p@rjbs.manxome.org> >To: perl5-porters@perl.org >Sent: Saturday, August 25, 2012 7:02 PM >Subject: Re: fixing smartmatch just hard enough (and when, too) > >Good, because I have favored that working-with-warning behavior for ambiguous >simple scalars. (What about `$x ~~ $glob`? That's where I liked >undef-and-warn.) >I can't say I favor working-with-warning. I prefer working-with-good default, with a way for the caller to specify how strings are to be interpreted. Default to eq with a simple syntax to switch to interpret-as-numbers. If you don't do this, then people (like me) will shy away from it as being too likely to cause an unexpected and unpredictable warning at runtime. Warnings are great, but you need to be able to predict them and prevent them with proper coding and/or testing. If you can't do that, then you have an unstable program (which is almost useless).Thread Previous | Thread Next