On Thu, Apr 12, 2018 at 01:40:42PM +0100, Alaric Snell-Pym wrote: > I think this is good, and doesn't need a warning. I think it could be a > legitimate statement of intent to create an empty else when writing > imperative-style code. > > (cond > ((= guess target) (display "You guessed correctly!")) > ((zero? guess) (display "You're not even trying!")) > ((> guess 100) (display "C'mon, you know the number's never more than > 100")) > (else)) ;; in all other cases, do nothing > > It declares that an unhandled case is *meant* to do nothing, rather than > being an omission on the part of the author. > > However, if others can think of likely situations where this is a > mistake, I'll concede a warning :-)
I agree, this should not necessarily warn. We already will emit a warning when you use the result of the expression in a procedure call to a procedure which does not accept arguments of the void type. Cheers, Peter
signature.asc
Description: PGP signature
_______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers