guile-user
[Top][All Lists]
Advanced

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

Re: iff?


From: Yuk-Wah Wong
Subject: Re: iff?
Date: Sat, 21 Apr 2001 12:11:05 +0800 (CST)

On Fri, 20 Apr 2001, thi wrote:

> "iff" is an elided form of "if and only if".  a quick grep through
> guile-core/doc texi files shows about 90 instances, a large number
> having the form: "Return #t iff OBJ is of type FOO.", i.e., documenting
> type predicates.  for these cases, using "iff" instead of "if" removes
> possible ambiguity of type inheritence and explicitly re-enforces the
> disjointness property.  using "iff" for type predicates in this way
> seems to be standard accepted practice.
> 
> the other cases i didn't look at closely, but i suspect their usage is
> in similar spirit.

We can put it more simply.  (A iff B) is actually the conjunction of (A if
B) and (B if A).  And since (B if A) implies (!A if !B), (A iff B) means
(A if B) AND (!A if !B).  That is, the only cause for A is B but not any
others.

So to return #t iff OBJ is of type FOO means if OBJ is of any type other
than FOO, then do not return #t.

If we say return #t _IF_ OBJ is of type FOO then something other than FOO
might cause #t to be returned.  Saying iff eradicates this possibility.
 




reply via email to

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