help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: if vs. when vs. and: style question


From: Rusi
Subject: Re: if vs. when vs. and: style question
Date: Mon, 23 Mar 2015 23:12:04 -0700 (PDT)
User-agent: G2/1.0

On Tuesday, March 24, 2015 at 7:54:43 AM UTC+5:30, Emanuel Berg wrote:
> "Pascal J. Bourguignon"  writes:
> 
> > In general, WHEN is better than IF.
> >
> > Also, (unless (e1) (e2)) is better than (if (not (e1))
> > (e2)).
> >
> > Notably, WHEN and UNLESS have an implicit progn:
> 
> "In general", you say. Is there any other advantage
> save for not having to do the explicit `progn' and/or
> `not'?

In general weaker is better
http://www.w3.org/2001/tag/doc/leastPower.html

(when a b) ≡ (if a b)
However (if a b c) ≡ (when ??)

Other example:

destructuring-bind is strictly weaker than if/cond and so better when usable


reply via email to

[Prev in Thread] Current Thread [Next in Thread]