[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: when and unless
From: |
Ludovic Courtès |
Subject: |
Re: when and unless |
Date: |
Fri, 01 Jul 2011 14:47:54 +0200 |
User-agent: |
Gnus/5.110017 (No Gnus v0.17) Emacs/24.0.50 (gnu/linux) |
Andy Wingo <address@hidden> skribis:
> One place you might want to use them though is in type checks for Scheme
> code. We currently don't do very much of that, but probably should in
> the future. As in:
>
> (define (parameter-fluid p)
> (unless (parameter? p) (wrong-type-arg p 'parameter))
> (struct-ref p 1))
>
> The advantage of `unless' over `if' is that the wrong-type-arg is not
> called in tail position, so the error message sees `parameter-fluid' on
> the stack.
Oh, interesting, good point!
Ludo’.