Michael Lazzaro wrote:

> Of course, we *could* define piping such that the C<grep> is not
> necessary:
> 
>    @source >> /foo/ >> @out;
> 
> ... by saying that a regex or closure in a pipe DWYM.

I think I'm against that because it makes it hard for somebody who sees
that in code for the first time to look something up in docs to discover
what it does.  With the word "grep" in there, they've got something they
can search for.

> Similar to the way we have the "do-everything" C<given>.

Except that "given" is also a word that can be searched for.  Yes
there's a lot of dwimery in using it, but that can all be hung off the
C<given> docs.

Hanging magic behaviour off pipelines could only be documented under
C< >> > (or whatever's chosen), and when an unfamiliar code snippet
contains a bunch of punctuation symbols it often isn't at all obvious
which bit the docs will help.  And even once it's been worked out,
non-words can be hard to search for.

Smylers

Reply via email to