On Friday 23 March 2007 14:04, Christophe Rhodes wrote:
> Nikodemus Siivola <nikodemus@...> writes:
> > G=C3=A1bor Melis wrote:
> >> (defun join-thread (thread &key (default-value-list nil
> >> default-value-list-p))
> > Not-quite-serious-but-still:
> > (defun join-thread (thread &rest default-values) ...)
> > More seriously, we could provide both, :DEFAULT and :DEFAULT-VALUES
> > (but only one at a time can be used).
> Isn't this smelling of something to anyone? What if I want to signal
> an error (but not a JOIN-THREAD-ERROR)? I think that the natural
> argument in these circumstances is a thunk to call, so that the user
> can specify whatever side-effects they want. Alternatively, do as
> READ and friends do, allow just a single value, and for exotic cases
> the user must handle JOIN-THREAD-FAILURE themselves.
This is similar in nature to the mutex timeout interface that Nikodemus=20
posted. Obviously, the thunk passing and the condition signalling are=20
equivalent at some level since one can pass a thunk that signals a=20
join-thread-error and one can also catch the join-thread-error and call=20
whatever function he wants.
It is a question of defaults. What is good for the user most of the=20
time, more idiomatic and lends itself to easier, less intrusive=20
customization of behaviour? To me the answer is clearly the condition=20
As to multiple values, Nikodemus has a point that we can make it a macro=20
but I'm leaning towards no default multiple values support today.