Subject: Re: On conditionals
From: Erik Naggum <erik@naggum.net>
Date: Wed, 21 Nov 2001 19:32:49 GMT
Newsgroups: comp.lang.lisp
Message-ID: <3215359963689804@naggum.net>

* Kent M Pitman
> (defun get-property (x y)
>   (when (symbolp x)
>     (get x y)))

* Espen Vestre
| good example, and quite representative for the kind of context in which
| I use the value of when myself!

  This is a sort of half-breed between a statement and an expression.  I
  hate examples, because people attach too much meaning to their specifics,
  but I was trying to draw a line between statements and expressions, which
  I honestly assumed would be understood as directly value-returning forms.
  I assume from your responses that you would _not_ write

(setq foo (when bar zot))

  but _would_ write

(setq foo (whatever))

  in the presence of

(defun whatever ()
  (when bar
    zot))

  the latter of which does communicate "enough" to be defensible.  However,
  I find it very, very strange that you think this is so representative of
  using when as an expression that you strongly disagree that when and
  unless should not be used for their value.  To me, that says that you
  want to use when in let bindings and for arguments to functions, etc,
  which I think is just plain wrong.  Please let me know if you want to use
  when in the usual expression positions, and thus make a distinction
  between whole function bodies inside when and unless and using them for
  smaller expressions.

///
-- 
  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.