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

CLI & crocks in evaluator



Your problem is that the cli-message handler is supposed to
be a function of ONE argument:

(defun cli-handler (ignore)
  ignore			;will always be nil I believe
  (valret))

will do what you want.  (valret of no arguments makes lisp kill
itself, not really a good way to determine if you know what's going
on.)

(setq cli-message '(cli-handler))

works because of the following strange property:

(funcall '(progn (print 'foo) 'cons) 1 2)
FOO
(1 . 2)

A list is evaluated before lisp decides that it isn't a reasonable
function, and if it returns a reasonable function, then that is used
instead.  

Can't we flush this losing property?  I cannot imagine a reasonable
defense for it not to be commented out of the evaluator.  No one who
should be taken seriously writes code that depends on this, and if
there really is old code using it, then it must be time to rewrite
that as well.  If anything at all is a crock, then this "feature" is
one too.

Surely we all can agree on this?