Let's please rename Block to Receiver before it's too late
Tim Peierls
tim at peierls.net
Sat Jan 19 06:58:34 PST 2013
On Sat, Jan 19, 2013 at 8:19 AM, Doug Lea <dl at cs.oswego.edu> wrote:
> On 01/18/13 21:36, Brian Goetz wrote:
>
>> OK, OK, if people really, really hate Block, I would still consider Sink.
>> Sink is the opposite of Source. We could rename Supplier to Source, and
>> rename Block to Sink. Leaving the method names the same (accept and get.)
>>
>>
> "Sink" is nice in the Stream framework, which is a plus in
> encouraging people to use it, but not in other common
> contexts where the main property to convey is that it is a
> possibly side-effecting action, as opposed to a Function.
>
> Does everyone else prefer "Action" as best possible name?
>
I mildly prefer Sink to Action. For one thing, IntSink sounds like a place
that ints end up in, and with IntAction it's less obvious what the Int-ness
means to the Action.
I agree that "sink" doesn't emphasize the side-effect aspect, but does it
really need to? What other use could a sink have? Whereas "action" doesn't
carry any sense of "consuming" or "accepting".
I would (again, *mildly*) prefer Receiver, Consumer, Acceptor, Handler,
etc., but only a little more than Source/Sink.
But I'm so happy to have moved off Block that any one of these would be
fine.
--tim
More information about the lambda-libs-spec-observers
mailing list