On Mon, Aug 20, 2012 at 4:52 PM, Tara Lorenz <tara@terralonza.de> wrote:
while trying to get cl-num-utils running on ECL i encountered a problem
with let-plus in combination with define-modify-macro.

Informal description: When define-modify-macro defines a three-argument
"modifier", ECL complains about  "wrong number of arguments" when used in
combination with let-plus and structure slots.  I see no problems when
used outside of let-plus.  I also see no problems when i use a two
argument modifier.

I believe the problem is in the SYMBOL-MACROLET used by LET+. LET+ encloses everything on a SYMBOL-MACROLET that defines expansions for the LET+ arguments. The problem is that some of the LET+ symbols that you used, MEAN and TALLY, are also used in the LAMBDA form from the define-modify-macro. In other words, your code is roughly equivalent to

(LET ((#:VALUE210 ACCUM))
  (DECLARE (IGNORABLE #:VALUE210))
  (SYMBOL-MACROLET ((MEAN (MEAN-ACCUMULATOR-MEAN #:VALUE210))
                    (TALLY (MEAN-ACCUMULATOR-TALLY #:VALUE210)))
    (INCF TALLY)
    (INCF-NOOP TALLY 1)
    (INCF-MEAN MEAN VALUE TALLY)))

When INCF-MEAN is expanded to

(LET* ((#:G205 VALUE) (#:G206 TALLY))
  (DECLARE (:READ-ONLY #:G205 #:G206))
  (SETQ MEAN
          ((LAMBDA (INCF-TEST::MEAN INCF-TEST::VALUE INCF-TEST::TALLY)
             (+ INCF-TEST::MEAN
                (/ (- INCF-TEST::VALUE INCF-TEST::MEAN) INCF-TEST::TALLY)))
           MEAN #:G205 #:G206)))

the uses of VALUE and MEAN in the lambda form are interfered by the SYMBOL-MACROLET.

Juanjo

--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain) 
http://juanjose.garciaripoll.googlepages.com