guile-user
[Top][All Lists]
Advanced

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

Re: iff?


From: Keith Wright
Subject: Re: iff?
Date: Sat, 21 Apr 2001 14:58:48 -0400

> Cc: address@hidden, address@hidden, address@hidden
> From: Neil Jerram <address@hidden>
> 
> >>>>> "Yuk-Wah" == Yuk-Wah Wong <address@hidden> writes:
> 
>     Yuk-Wah> We can put it more simply.  (A iff B) is ...

Yow!  You must be using "simply" in some obscure technical
sense.  A iff B means A is logically equal to B.

> Not all the docstrings that could use `iff' do so.  A good number of
> them use the form:
> 
>         Return #t if ...; otherwise #f.

This is good.

> Perhaps this would be clearer for people without a mathematical
> background?

I have a PhD in theoretical computer science, emphasis in logic,
and I say it's not just clearer for the non-mathematical, but
also for the very picky.  If you say

   (null? x) returns #t iff x is the empty list

you have said almost nothing about what it returns if x is
not the empty list.  We know it does not return #t, but it
could return anything else, or even not return at all.
(Of course if you have previously said that it returns a
boolean then you are done, but only because #f is the only
boolean that is not #t.)

-- 
     -- Keith Wright  <address@hidden>

Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com>
         ---  Food, Shelter, Source code.  ---



reply via email to

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