From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news2.kpn.net!news.kpn.net!nslave.kpnqwest.net!nloc.kpnqwest.net!nmaster.kpnqwest.net!nreader3.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: On conditionals References: <3215299538573186@naggum.net> <9tgcpc$3ce$1@news.gte.com> <3215360195434986@naggum.net> <3215376680290370@naggum.net> Mail-Copies-To: never From: Erik Naggum Message-ID: <3215379161045820@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 56 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 22 Nov 2001 00:52:43 GMT X-Complaints-To: newsmaster@KPNQwest.no X-Trace: nreader3.kpnqwest.net 1006390363 193.71.66.49 (Thu, 22 Nov 2001 01:52:43 MET) NNTP-Posting-Date: Thu, 22 Nov 2001 01:52:43 MET Xref: archiver1.google.com comp.lang.lisp:20690 * 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.