[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Current practice:argument types in function declarations
Date: 16 Dec 87 1:32:02 PST
Does anyone *have* any Common Lisp code which contains such declarations? What
is the intent of the declarations, other than as documentation?
All the code I write has such delcarations, including for the types of all
returned values. The immediate purpose is documentation since it's ignored on
the machine I happen to work on (a symbolics) but it's my hope that in future
the compiler/interpreter would complain about calls to the function that pass
the wrong type of argument at compile time, if it can tell. (runtime would
depend on OPTIMIZE SAFETY or some such, and probably local declarations inside
the defun or whatever).
Also, it could be used as a note to the debugger, since it could flag that an
argument was of an unexpected type if some other problem arises and it gets
invoked. (this would help track down the error).
But I'm a user, not an implementor: this is just what I hope to eventually get
out of it. As I said, right now it's just documentation so the next guy knows
what I expected the function to handle when I wrote it.
University of Rochester Computer Science Department