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

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

Re: [External] : Re: operations on path lists


From: Jean Louis
Subject: Re: [External] : Re: operations on path lists
Date: Sat, 4 Feb 2023 21:32:10 +0300
User-agent: Mutt/2.2.9+54 (af2080d) (2022-11-21)

* Drew Adams <drew.adams@oracle.com> [2023-02-04 20:23]:
> > > (cond ((file-directory-p file) (expand-file-name file))
> > >       (t nil))
> > 
> > (when (file-directory-p file) (expand-file-name file) )
> 
> (and (file-directory-p file)  (expand-file-name file))
> 
> Use `when' when the return value isn't important.
> Helps human readers.

I understand the idea, and I found `cond' serves that purpose better.

So I follow the same purpose in the essence.

In that particular example, the return value would be rather hidden
and implied from `when'.

For me that is not same as when the value is visible, such as `nil'.

So those are differences in view points on what is helpful to human
reader or not.

If reader is familiar with `when' and not with `cond' it will be
easier, but if readier is familiar with `cond' maybe that is easier.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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