Re: [perl #127980] Smartmatching $item ~~ list does not DWIM (4 ~~ (4,5,6,7))

2016-04-27 Thread Parrot Raiser
It appears, then, that the problem is managing the user's understanding of the construction and expectations about results. On 4/27/16, jn...@jnthn.net via RT wrote: > On Mon Apr 25 07:54:18 2016, sml...@gmail.com wrote: >> That said, two of the edge cases you have discovered, *do* feel pretty >>

[perl #127980] Smartmatching $item ~~ list does not DWIM (4 ~~ (4,5,6,7))

2016-04-27 Thread jn...@jnthn.net via RT
On Mon Apr 25 07:54:18 2016, sml...@gmail.com wrote: > That said, two of the edge cases you have discovered, *do* feel pretty > strange: > > - An *empty* RHS list returning self instead of False. > - A RHS list with a Match as its first element returning self instead > of False. > > It may make s

Re: [perl #127980] Smartmatching $item ~~ list does not DWIM (4 ~~ (4,5,6,7))

2016-04-26 Thread Lloyd Fournier
I may not be the typical user but I like 4 ~~ (1,2,3,4) not meaning 4 ~~ any(1,2,3,4). I would only want ~~ List to be True if the LHS is Positional (maybe Iterable) that has the same values in the same order. If 4 ~~ (1,2,3,4) returns true, shoulnd't (1,4) ~~ (1,2,3,4) also be true? I don't think

[perl #127980] Smartmatching $item ~~ list does not DWIM (4 ~~ (4,5,6,7))

2016-04-24 Thread via RT
# New Ticket Created by Alex Jakimenko # Please include the string: [perl #127980] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=127980 > Code: say 4 ~~ (4,5,6,7) Result: False Most people expect that it will check if the l