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

Re: Issue: FUNCTION-TYPE (version 4)



    Date: Mon, 1 Jun 87 20:14 EDT
    From: David A. Moon

    This kind of warning strategy isn't very effective for things
    that cannot be detected at compile time.  A run time warning tends
    to be a big annoyance and may not tell you just where in your
    program was responsible for the effect.

True, but I think many of the cases could in fact be detected at run
time.  Of course I have not done an extensive search, and there may well
be large bodies of code for which this is not true.  Those large bodies
of code will require hand analysis and conversion.

Here is another point which I think is relevant to this discussion.
Define the Z of a lisp programmer to be their familiarity with the
subleties of Lisp programming.  This includes things like the history of
Lisp, what dynamically scoped Lisps are like, what Lisp-1s are like etc.
etc.  It seems to me that as time goes on, the average Z of lisp
programmers is going to go down.  In some sense, that is what it means
for Lisp to become a successful language.  An effect of this, is that in
most cases, it is going to be much easier for the people who have
written the existing code to deal with a change like the one I am
suggesting, than it will be for future programmers to deal with the
confusion caused by not making the change.  This is over and above the
fact that there will be much more code 5 years from now (we all hope!).

Take the example of Macsyma (or Spire or Kee or any other large 'old
time but still in use' Lisp program).  What if this change breaks one of
them?  We have to weigh that with the cost of propagating past confusion
by making apply and friends do conversion.  But the people who maintain
systems like Macsyma and KEE are likely much higher Z programmers than
people who are writing new code.  It probably won't be real hard for
these old time people to make this change.  It is more likely that the
new lisp programmers will get confused and write bad code.  I supect
people will write

(squirrel-function-away-1 '(lambda (x) ..))

(squirrel-function-away-2 #'(lambda (x) ..))

(funcall (fetch-function-1) (some-data))

(funcall (fetch-function-2) (some-data))

Since both 'functions', when they are fetched and funcalled will work,
people won't notice that the one isn't compiled.  When and if they do
notice, it may take them a long time to understand why they are losing
this way.