On 10/04/18 09:49, felix.winkelm...@bevuta.com wrote:
>> Thanks for pointing this out, Jörg.
>> I think making this case *actually* undefined would be OK. In other
>> words, treat it like a one-armed if or (cond-expand (else)).
>> It might be nice to add a warning, too, but that's a bigger patch so we
>> can start with this. Hackers, your thoughts?
> Sounds reasonable.

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.

  ((= 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
  (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 :-)


Alaric Snell-Pym

Chicken-hackers mailing list

Reply via email to