* David Golden <dagolden@cpan.org> [2012-08-28T18:52:35] > On Tue, Aug 28, 2012 at 5:06 PM, Jesse Luehrs <doy@tozt.net> wrote: > > > I think people will have fewer reservations about accepting weird > > special cases like this for a keyword-based control structure > > (especially considering the precedent set by while (<>), etc) than for > > an infix operator (since it will be a weird special case either way - > > "why can i do '$foo ~~ 1', but not '$a = 1; $foo ~~ $a'?". > > > > > The opportunity for confusion exists either way. My suggestion is to > change *one* thing -- smartmatch -- instead of *two* things -- smartmatch > and when. That's not quite true. No matter what we're changing both. Right now, when has many special cases that are not smartmatch: perldoc perlsyn and search for "Most of the power" > Then all people have to know/relearn is the smartmatch table, not the > smartmatch table *and* the special case rules for when. This is true, though, if when has no special cases, and the way we change it is to remove them all, leaving only "when ($smartmatch_rhs)" I think there are merits to both that and to the way I proposed it. I feel very strongly about the specific example that Jesse L. provided above. I want to write some code and see what it looks like... -- rjbsThread Previous | Thread Next