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

arglist legibility suggestion

The ARGLIST function is available in Symbolics 7.1 (ctrl-shift-A), and I
imagine, in many other Lisps. There should be a way to make it return
more reasonable values.  Currently, for example, it gives uninformative
and illegible things like this:

 PRINT-OBJECT: (Disc-Fn-Arg 0 Disc-Fn-Arg 1 Disc-Fn-Arg 2)

Suggestion 1: Please make the symbol names more legible, i.e. instead
of "Disc-Fn-Arg 0", use something like "Disc-Fn-Arg-0", or even "Arg-0".

The spaces make it look like PRINT-OBJECT takes 6 arguments, not 3.
 PRINT-OBJECT: (Arg-0 Arg-1 Arg-2)  would be an improvement.

Suggestion 2: Instead of gensyming the arg names, you could at least see
if all the methods agree on their names. If every method uses the same
name (or IGNORE) for the name, use it. For example, the arglist to
print-object should be:


Suggestion 3: Symbolics allows you to DECLARE a function's arglist, but
using DEFMETHOD ignores such declarations. It would be nice if this worked:

(defmethod print-object ((self bagel) stream ignore)
  #+symbolics (declare (scl:arglist thing stream depth))


In case multiple methods make such declarations, you could either accept
the latest declaration, or take some kind of plurality vote, like in
suggestion 2 above. DEFMETHOD should take care not to override such
declarations if they exist.