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.

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))

What's the advantage of splitting it to a different SRFI in this case?

Because it's hard enough to get hash tables right without it,
and there seem to be a lot of open issues with weak refs as
it is.

Also, given hash-tables and weak refs/ephemerons separately,
you can always implement weak hash-tables by using a weak
pair as both key and value, and making the hash and equality
functions consider only the key of the pair.

It thus seems preferable to leave these orthogonal concepts
separate for now.

Fold is called sum here since it's unordered.

That's a really confusing name.

Pop! does not behave like
the SRFI-125 pop!, and a push! equivalent for this pop! makes no sense
(it's just set!).

I don't like that definition of SRFI-125 pop!.
I've used push! but perhaps not often enough to include here.

Inc!/dec! are pretty much just:

    (hashtable-update! ht k inc 0)
    (hashtable-update! ht k dec 1)

Since inc and dec are not defined (and are usually called add1
and sub1), you have to write it out as a lambda.  Either way,
these super common, I'd rather have them predefined.

-- 
Alex