[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lambda The Ultimate: use failure-thunk instead of default value?

This page is part of the web mail archives of SRFI 69 from before July 7th, 2015. The new archives for SRFI 69 contain all messages, not just those from before July 7th, 2015.

Panu Kalliokoski wrote:
> I've also thought about this.  I know the thunk version is more
> expressive.  However, I also think that a simple default value is the
> common case.  I'd like to have both.

Another alternative might be to have either

  ;; I prefer this option
  (hash-table-get ht key [failure-thunk])
  (hash-table-get/default ht key default)


  ;; However, this would also work
  (hash-table-get ht key [default])
  (hash-table-get/failure-continuation ht key failure-thunk)

perhaps spelling hash-table-get/failure-continuation as hash-table-get/fk.