[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (unless ...) vs (when (not ...))
From: |
Eric Abrahamsen |
Subject: |
Re: (unless ...) vs (when (not ...)) |
Date: |
Fri, 16 Jul 2021 16:12:19 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> Should I use (unless ...) or (when (not ...))? Which one is preferable?
In terms of compilation, they both turn into `if' statements, so there's
no real difference there. Personally I find that, when I'm "reading" the
code out loud in my head, one approach will sound more natural than the
other, which can make things a little quicker to parse mentally. But it
really depends on what the condition is and how it's tested.