On 7/8/2015 7:57 AM, Mark Pace wrote:
> Thank you all for the suggestions.  For this need, and for clarity of this
> code, HOLE is what I am looking for.

If you just want to put something there as a convention to mark that
there's an output you're not using, TAKE 0 is a safer choice.  It should
make it equally clear that you don't want any of the output, and it will
disconnect as soon as it starts, without reading any extra data.

HOLE is really for cases where you want to make use of the side effects
of keeping a stream connected.  Stages like CMS and CP, for instance,
can behave differently depending on whether the alternate output is
connected.  And it's commonly used with APPEND to ensure that one output
file is finished before the next input file is read.  As a trivial example:

  PIPE literal OK | > OK file a | hole | append state OK file a | cons

APPEND waits for HOLE to discard all the input before it calls STATE, so
">" has a chance to finish writing the file before STATE looks for it.

¬R

Reply via email to