On Aug 7, 2015, at 12:27 PM, Michael Titke <michael.tied...@o2online.de> wrote:

> I always suspected this to be a logical joke of forcing people to write their 
> own quantifiers and to not let them fall for predicate logic.
> 
> The best thing about a logic scheme declaring everything but really 
> everything to be true when it is not false are expressions like the following:
> (when (cond (#f 'true)) 'what-is-true?) => 'what-is-true?

The confusing thing about your example, I think, is that cond returns #<void> 
if none of the clauses match, when it would be slightly less bug-prone if it 
raised an error in that case.

> Yes, even unspecified is not false but it could have been. But that was not 
> specified. ;-)

Do you mean #<void>?  I think it's great that #<void> is a truthy value, 
because it allows things like:

(and
  (some-predicate ...)
  (some-effect-returning-void ...)
  (some-predicate ...)
  (some-effect-returning-void ...)
  ...)

Or possibly one of those effects could return void on success, but false on a 
failure, which would cause the `and` expression to stop and return false, 
signaling a failure. That's one nice use of that, at least. 

Also the simpler the true/false separation is, the better, in my opinion. 


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to