[concurrency-interest] Subject: Re: ConcurrentHashMapV8

Martin Buchholz martinrb at google.com
Mon Feb 24 11:08:41 EST 2014

On Sun, Oct 9, 2011 at 2:32 PM, Jed Wesley-Smith <jwesleysmith at atlassian.com
> wrote:

> The functional/persistent Stream interface is a great alternative that
> doesn't rely on null being magic:
> Stream<T> {
>   T get(); // throws if empty aka head()
>   Stream<T> next(); // aka tail()
>   boolean isEmpty();
> }
> implementations can be strict or lazy, but each actual instance is
> referentially transparent.

I don't quite understand this - it seems to reintroduce the atomicity
problem of Iterator hasNext/next.  Iterators solve this (annoyingly for the
implementer) by creating a one-element buffer to hold the promised next
element, and this would have to do likewise?  Or else isEmpty is just a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20140224/5fc74ae2/attachment.html>

More information about the Concurrency-interest mailing list