Subject: Re: On conditionals From: Erik Naggum <email@example.com> Date: Thu, 22 Nov 2001 00:52:43 GMT Newsgroups: comp.lang.lisp Message-ID: <firstname.lastname@example.org> * Thomas F. Burdick | Bleah, I guess this is just a matter of taste, then. Nonono, you are just _wrong_. :) | And, honestly, I don't see anything about #F as different from () and NIL | that would make it hard to get, per se. It would mean that functions need to know whether they should return an empty list or a boolean. This is the reason that the pun is useful, just as 0 being false in C is useful. I actually find s specific boolean type to be incredibly painful -- to use it, you would always need multiple values. It is not unlike asking real people "Do you know the time?". "Yes" is not a good answer. Just the time will do nicely, thank you. If you had me test for, say, find returning true before I could use its return value, I would probably write macros to circumvent such nonsense. | [ As for Perl, you really don't mind the *string* "0" being false?!?! ] That Perl does type conversions east and west so you never actually know what type of object you are dealing with is sometimes convenient par excellence, but most of the time, it is just plain nuts. However, it is actually useful in a number of languages. SQL, for instance, gets around some of its syntax problems with this flexibility. | Actually, I meant NIL qua symbol, not the empty list. Although, if I had | my druthers, () wouldn't be false either. I just don't see what's so | hard about writing (not (null ...)). Well, it looks like really bad language design. Like Scheme. Failing to have a function that turns something into a boolean directly is bad. If you want to see if foo is a non-empty list, (not (null foo)) looks dumb, but if you are expecting a list, (consp foo) is the right choice, in which case you are well advised to look at typecase instead of cond. | While I won't argue with that characterization of Scheme, I don't think | that seperating () and false is choosing purity over practicality. Well, conflating "nothing" and "false" has long traditions in both logic and programming languages. I think objection to it come only from a misguided sense of purity without a sense of history or continuity. | I think it's easier to read code that checks for NIL explicitly, and I | don't think that checking with the NULL predicate is a particular | hinderance. Well, if you used typecase and tested for null and cons and other types, I would probably support you, but (not (null ...)) says "Scheme freak!" to me, and in a horrible font, too. :) /// -- Norway is now run by a priest from the fundamentalist Christian People's Party, the fifth largest party representing one eighth of the electorate. -- Carrying a Swiss Army pocket knife in Oslo, Norway, is a criminal offense.