Why does 'matrix' evaluate its arguments anomalously?



The matrix function evaluates its arguments anomalously:

x1: 'x2$
apply('matrix,'[[x1]])  => matrix([x2])


Compare this with other functions with n arguments:

apply('append,'[[x1]]) => [x1]


This is because matrix is defined as an mspec, evaluating its own arguments:

(defmspec $matrix (L) ...  (let ((rows (mapcar #'meval (cdr L)))) ,,,)


while append is defined like this:

(defmfun $append (&rest args)...)

I suspect this is purely a historical artifact from an ancient version of
MacLisp/meval which didn't have &rest arguments.

Can anyone think of a reason that matrix shouldn't be simply this:

(defmfun $matrix (&rest rows)
  ;; special case not necessary for 0 rows
  (dolist (row rows)
    (if (not ($listp row)) (merror (intl:gettext "matrix: row must be a
list; found: ~M") row)))
  (matcheck rows)
  (cons '($matrix) rows))