On Wed, Sep 30, 2015 at 5:56 PM, Taylan Ulrich Bayırlı/Kammer <xxxxxx@gmail.com> wrote:
Alex Shinn <xxxxxx@gmail.com> writes:

> On Tue, Sep 29, 2015 at 6:17 PM, Taylan Ulrich Bayırlı/Kammer
> <xxxxxx@gmail.com> wrote:
>
>     I find thunk arguments pretty weird. Continuation passing style is
>     great and all but it's not how we want to write our code, is it?
>     Returning multiple values is simpler.
>
> I prefer CPS to MV in general, especially since MV are broken in
> Scheme.

I don't see how MV are "broken."  It just seems like slander used by
those who dislike their semantics. :-)

You and Alan Bawden both seem to dislike their current semantics:

https://groups.google.com/d/msg/comp.lang.scheme/dKdd_jmYyFA/Q9eo7AQkBgAJ

I dislike MV because they complicate the semantics of Scheme,
breaking compositionality.  You can no longer write wrappers
like memoize, trace, time, etc. without preparing to capture an
arbitrary number of values, which is slow.

But I've argued this a million times and have no interest in
continuing the debate.
 
> Personal preferences aside, in this case,
>
> (hash-table-ref ht k (lambda () expr))
>
> is shorter and cleaner than
>
> (receive (val found?) (hashtable-lookup ht k)
>   (if found? val expr))

Can you give a couple real-life examples on what 'expr' typically is?
I'll base my judgment depending on that.

(hash-table-ref ht k (lambda () (hash-table-ref ht2 k)))

-- 
Alex