Closed primo-ppcg closed 11 months ago
I usually find code that uses (unless ...
over (when (not ...
harder to understand when I'm reading someone else's code.
I've used such code myself, but when returning to it, it hasn't been unusual to find it on the opaque side and I sometimes resort to rewriting using (when (not ...
(sometimes just temporarily).
That said, it seems easy to add (and maintain?) and unless
is part of Janet, so it seems like a sensible change to me.
I recently attempted to write something like this:
and was surprised that isn't supported. Of course, this can be written as
:when (not (f i))
, but given the presence of both:while
and:until
, it seems like an omission.It's also trivial to add: