On Wed 28 Aug 2013 at 09:38:06AM +0800, Mike Anderson wrote:

> Of course, if anyone has an actual technical argument why it is
> necessary/better to use nil as a sentinel value, I would be delighted to
> learn of it and would consider myself enlightened.

Forgive me if someone already mentioned this, but isn't this simply a
consequence of building on the existing Java Queue implementations?

Quoting http://docs.oracle.com/javase/7/docs/api/java/util/Queue.html:

    Queue implementations generally do not allow insertion of null
    elements, although some implementations, such as LinkedList, do not
    prohibit insertion of null. Even in the implementations that permit
    it, null should not be inserted into a Queue, as null is also used
    as a special return value by the poll method to indicate that the
    queue contains no elements.

I think most would agree with you that a configurable sentinel value
is best (I like using ::namespaced-keywords myself), but the existing
machinery has already decided on null, so that's what we have.

    guns

Attachment: pgp6xD5GT3rVU.pgp
Description: PGP signature

Reply via email to