[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Re: operations on path lists
From: |
Emanuel Berg |
Subject: |
Re: [External] : Re: operations on path lists |
Date: |
Sat, 04 Feb 2023 22:51:23 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Jean Louis wrote:
>>>> (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.
The reader ... you, the writer, should write as good code as
possible, that will benefit everyone the same way.
--
underground experts united
https://dataswamp.org/~incal
- operations on path lists, Samuel Wales, 2023/02/04
- Re: operations on path lists, Jean Louis, 2023/02/04
- Re: operations on path lists, Emanuel Berg, 2023/02/04
- Re: [External] : Re: operations on path lists, Jean Louis, 2023/02/07
- RE: [External] : Re: operations on path lists, Drew Adams, 2023/02/07
- RE: [External] : Re: operations on path lists, Drew Adams, 2023/02/08
- Re: [External] : Re: operations on path lists, Jean Louis, 2023/02/08
- Re: operations on path lists, Jean Louis, 2023/02/04
- Re: operations on path lists, Samuel Wales, 2023/02/04
- Re: operations on path lists, Samuel Wales, 2023/02/04
- Re: operations on path lists, Emanuel Berg, 2023/02/05