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 <perl6-bugs-follo...@perl.org> 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 >> 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 sense to investigate if those edge cases can be "fixed" - >> but don't throw out the baby with the bathwater. > > They're there for a very practical, rather than a very beautiful, reason. > :-) They are there to make: > > say 'abc' ~~ m:g/\d/ > > And: > > say 'abc' ~~ m:g/\w/ > > Do the right thing, and produce a List of Match results (which may be > empty). Even before this, it was decided that `4 ~~ (4,5,6,7)` should not > magically mean testing for inclusion in the list (I forget the exact > reasoning, but confusion when considering lists of lists would be one good > one). There are plenty of other ways to do that, such as: > > say 4 (elem) (4,5,6,7) > > So, ticket rejected since the current behavior is both serving an important > purpose and the proposed DWIMmery has, best I can recall, been tried and > rejected in the past. > > Thanks, > > /jnthn > >