Re: Bug 4689 & deprecating limroot
Raymond Toy <[email protected]> Wed, 27 May 2026 13:52:27 -0700
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <[email protected]> |
On 5/27/26 5:01 AM, Barton Willis via Maxima-discuss wrote: > 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.")) In this case where there’s exactly one caller, I think you should just delete it. > > 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. It’s highly unlikely that would work with maxima today. So much has changed. > 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. My take on this is that if it’s an internal function we are free to change internals as we like, including the arglist, name, behavior, etc. Or even remove it. Of course, we’re not very careful about distinguishing between internal and external functions except that defmfuns are really meant (generally?) for the user. For functions intended for the user, we should be more careful, of course, because that’s expected API. ​ _______________________________________________ Maxima-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maxima-discuss