Re: Bug 4689 & deprecating limroot
David Scherfgen via Maxima-discuss <[email protected]> Wed, 27 May 2026 14:24:35 +0200
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <CAMTHLKg2R_RKkH7h0ORWr6arBiCNeDPhbs=+0wE5uFyF4F-2gg@mail.gmail.com> |
For defmfun, there's a :deprecated keyword argument, if I remember correctly. For purely internal functions, we could create a macro like defun-deprecated for defining a function that raises the error. Barton Willis via Maxima-discuss <[email protected]> schrieb am Mi., 27. Mai 2026, 14:05: > To fix bug 4689 <https://sourceforge.net/p/maxima/bugs/4689/>, I revised > the cryptically named function colexpt. The revised code no longer > requires the function limroot. Since limroot is not called by any other > function and does not appear to be generally useful, I propose to > deprecating it. Accordingly, I propose replacing > > (defun limroot (exp power) > (cond ((or (atom exp) (not (member (caar exp) '(mtimes mexpt) :test > #'eq))) > (limroot (list '(mexpt) exp 1) power)) ;This is strange-JIM. > ((mexptp exp) (m^ (cadr exp) > (sratsimp (m* (caddr exp) (m^ power -1.))))) > (t (m*l (mapcar #'(lambda (x) > (limroot x power)) > (cdr exp)))))) > > with > > (defun limroot (&rest args) > "limroot is deprecated and no longer available." > (declare (ignore args)) > (merror "limroot is deprecated and no longer available.")) > > If anyone has an emotional attachment to limroot, speak now or forever > hold your peace. There is always the possibility that someone has 1970s-era > code on a floppy disk in a sock drawer that still calls it. > More seriously: Maxima does not have a uniform mechanism for deprecating > functions. If anyone has suggestions for a better approach, I’m happy to > hear them. > > --Barton > > > > _______________________________________________ > Maxima-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > _______________________________________________ Maxima-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maxima-discuss