chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] patch: treat #t as alternative to else in cond


From: Peter Bex
Subject: Re: [Chicken-hackers] patch: treat #t as alternative to else in cond
Date: Fri, 15 Nov 2013 20:16:04 +0100
User-agent: Mutt/1.4.2.3i

On Thu, Nov 14, 2013 at 02:31:44PM +0100, "Jörg F. Wittenberger" wrote:
> Hi all,
> 
> attached a single statement patch.  It makes "cond" expand clauses with 
> "#t" as condition like "else".

This should probably be handled in the scrutinizer, but for now I guess
it's okay to warn on constants.  Attached is a patch that detects other
constants as well, because that could be an even more common mistake
than a plain #t.

Maybe we should move constant? into common-declarations or something...
The problem is that its comparison with quote is unhygienic (I guess
it's normally used in the compiler after it's been normalised).

Cheers,
Peter
-- 
http://www.more-magic.net

Attachment: 0001-Warn-on-cond-clauses-following-constant-expressions-.patch
Description: Text document


reply via email to

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