defmfun (was Re: [Maxima] Case-sensitivity goals, policy and implementation)
Subject: defmfun (was Re: [Maxima] Case-sensitivity goals, policy and implementation)
From: C Y
Date: Tue, 12 Oct 2004 19:41:21 -0700 (PDT)
--- Stavros Macrakis <macrakis@gmail.com> wrote:
> defmfun may not be the right place to hang this functionality, and we
> might as well get rid of Maclisp narg syntax -- BUT it might be a
> good idea to have a standard way of defining Maxima-level functions
> defined in Lisp. For example,
>
> (defmaxfun foo (...)
> "maxima-level documentation"
> "lisp-level documentation"
> <<body>> )
>
> would define $foo as a Lisp function, do whatever Alias'ing is
> useful, register foo as a Maxima function wherever that is useful,
> etc.
I agree we should have a standard way of defining a Maxima-level
function. However, I'm not sure I like having to define a separate
defmaxfun for this sort of thing. What about this - if we ultimately
decide to do packages in Maxima, instead of doing anything at the code
level defining and setting up user level functions would just be a
matter of exporting the appropriate functions, using them in the
MAXIMA-USER environment, and defining whatever we want defined for them
there. That way, the logic for ALIASing can function strictly in the
MAXIMA-USER environment, which can automatically do that for everything
it uses. I think this would be a lot cleaner in the long run, since
programmers writting math code don't have to mess with ANY of this
nonsense at the code level. They just write their normal lisp code,
and define an export list for the package. After that, all the nitty
gritty user level details are handled a level above them, and they
never have to worry at all. If the decision is made that a particular
function should be available or not available to the user, just put it
on or take it off the export lists. No other code changes needed.
I know packages are an issue not yet decided on, but if we at least
impliment the MAXIMA-USER package now perhaps several things could be
made cleaner and simpler?
CY
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail