Nikita Karetnikov <nik...@karetnikov.org> skribis:

>> Nikita: comments welcome on the two commits I just pushed in
>> wip-signed-archives.
>
> Thanks for working on it.  One question: in the past, you told me to
> avoid ‘false-if-exception’.  If it’s an issue here, can we replace it
> with something else?

What did I say?  :-)  (We have a saying in French: “do what I say, not
what I do”.  ;-))

I used it in two places:

                   (false-if-exception
                    (and=> signature narinfo-signature->canonical-sexp))

and:

  (define (valid-narinfo? narinfo)
    "Return #t if NARINFO's signature is not valid."
    (false-if-exception (begin (assert-valid-narinfo narinfo) #t)))

‘false-if-exception’ should indeed be used with care, because it hides
every error (including unbound var errors and such!), so it could be
hiding errors that really ought to be reported.

In the above cases I considered it OK, because the set of exceptions
that can possibly be raised is limited, and because the outcome of
‘false-if-exception’ is conservative (that is, at worst all narinfos
will be treated as if they were unsigned or invalid.)

Does it makes sense?

Ludo’.

Reply via email to