Hi,

On Wed, Jan 29, 2014 at 9:44 AM, Michael Dürig <[email protected]> wrote:
> On 29.1.14 3:35 , Jukka Zitting wrote:
>> Those aren't side effects, they're the explicitly what the classes are
>> wired  up to do. There's no other effects of that wiring.
>
> I didn't doubt that this works as designed. But still the design relies on
> side effects of the parameterless method generate(). If there weren't any
> side effect generate() could as well be substituted by a constant.

Ah, I see your point. You're right, the EventGenerator is not
functional in design. That's what we had also earlier with
EventIterable.createChildGenerator(), now the statefulness of the code
is just exposed a bit more explicitly. We can't make this code
entirely functional as long as there are no native continuations in
Java.

>> To make this more explicit, we could replace the direct
>> LinkedList accesses in QueueingHandler with something like
>> EventQueue.addEvent(), which would encapsulate the queue entirely
>> within EventQueue.
>
> Yes, let's do that.

Done in r1562464.

BR,

Jukka Zitting

Reply via email to