There is a rather long discussion in incident
http://rt.perl.org/rt3/Ticket/Display.html?id=90886
about the switch feature (given...when and smartmatching)
It begins on 17 Mai 2011:
> From: Tom Christiansen <tchrist@perl.com>
> I had intended to remove the "emulating case structures" bits
> from the documenation in favor of the switch feature. I have
> now decided against doing so. That's because the old case-
> emulation stuff is understandable, reliable, and predictable,
> whereas the new bits are none of those things.
> ...
...and it stops (without a conclusion) on 30 Mai 2011
> From: Johan Vromans <jvromans@squirrel.nl>
>
> Leon Timmermans <fawaka@gmail.com> writes:
>> I think the only sane solution would be really simple: split
>> it up. Have one statement that always does boolean-if-with-
>> break and another one that always does smartmatch-if-with-
>> break, that way there'll be no ambiguity left. There's no
>> reason why these two need to share the same keyword.
>
> Wouldn't it be easier to enforce boolean matching with !!, e.g.
>
> when ( expr ) { ... smart ... }
> when ( !!expr ) { ... boolean ... }
>
> or even
>
> when ( !expr ) { ... boolean, but negated ... }
My question is quite simple: is there any progress made on this topic
since 30 may 2011 ?
-- Klaus
Thread Next