[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] [PATCH] Fix error message when aborting colon
From: |
Julian Stecklina |
Subject: |
Re: [STUMP] [PATCH] Fix error message when aborting colon |
Date: |
Sat, 07 Nov 2009 00:03:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Lionel Flandrin <address@hidden> writes:
> On Thu, Nov 05, 2009 at 04:04:35PM +0100, Mikael Jansson wrote:
>> Lionel Flandrin wrote:
>> > It's all in the subject.
>> >
>>
>> + (let ((input (read-one-line screen prompt initial-input)))
>> + (if input
>> + (string-trim " " input)
>> + nil))))
>>
>> Style question: why (if ... nil) rather than (when ...)?
>>
>
> I just though it made more obvious "nil" is the return value rather
> than implying it. Not sure it's a good thing, it just looked clearer
> to me when I wrote it.
I consider it bad style to use WHEN if one wants to return NIL on a
false condition. WHEN is best used for side-effects.
Regards,
--
Julian Stecklina
The day Microsoft makes something that doesn't suck is probably the day
they start making vacuum cleaners - Ernst Jan Plugge