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

Re: variata



  >Date: 26 Apr 1986  10:33 EST (Sat)
  >From: Bill Rozas <JINX%OZ.AI.MIT.EDU%xx.lcs.mit.edu@csnet-relay>
  >
  >    [Bartley:]
  >     -- I like warning messages for things like (MAKE-VECTOR 0 exp) more
  >    than you do.  We can probably agree to provide declarations so you
  >    won't refuse to buy my system!
  >
  >I agree with JAR.  I think that (MAKE-VECTOR 0 exp) is reasonable and
  >no error (warning) message should be given.  I don't understand why
  >you object to it.  Why not warn about reversing a list with less than 2
  >elements also?

I'm not objecting, just asking questions to clarify JAR's position and
to elicit comments from others with strong opinions.  Let's see if I
can clarify both mine and yours: 

 -- I agree that (MAKE-VECTOR EXP1 EXP2) shouldn't be an error or
cause a warning at runtime should EXP1 evaluate to zero.  I'm talking
about compile-time warnings (e.g. for a COMPILE-FILE) when EXP1 is a
literal zero.  I oppose most, perhaps all, warnings during evaluation.
Sorry I wasn't more explicit -- I tend to think in terms of separate
compilation and I'm sure many of you are thinking primarily in terms
of interpretation.

 -- Likewise, (REVERSE EXP3) obviously shouldn't cause a warning when
EXP3 evaluates to a list with fewer than two elements.  But a
compile-time warning about (REVERSE '(A)) might be helpful (if it
weren't so unlikely!).

There's no real debate here.  If I were to report `warnings,' as
opposed to actual `errors,' I'd do it only in a compilation mode where
they wouldn't be confused with the runtime behavior of the program and
only if the user asked for them by setting a flag.  This is a
development environment issue, not a language issue.

>     -- We agree that (ELSE) is a no-no and that (COND) and (COND (ELSE exp))
>     are valid.
>
>     -- I feel that (BEGIN) should have the same meaning as (COND), but I
>    won't push the point.
>
>I don't like this.  Unfortunately JAR did not give me choice c (status
>quo, where (COND (ELSE ...)) is legal, but (COND) is not), which I
>like best.  I object pretty strongly to (BEGIN) and somewhat less
>strongly to (COND).  The usual rationale is that it makes macros
>easier to write, but this is just laziness of the same sort as using
>(cdr (assq <something> <some-list>)) in a Lisp where (cdr '()) -> '().
>(COND (ELSE ...)) although silly has a clear meaning (unless the ELSE
>clause is empty, which should be an error, but we agree on this).

Actually, JINX and I seem to agree that (BEGIN) and (COND) are equally
meaningless.  I offer to allow (COND) but feel (BEGIN) makes as much
sense.  If there's a consensus against (COND), then I'm even happier.
I'm not all that motivated by wanting to write lazy macros or program-
generating programs for reasons similar to JINX's.

Regards,
David Bartley
-------