cobyla



There is a convention in common lisp programming that global variables
have asterisks front and back. Thus

(defparameter *globalfoo*  1234) ;; etc

It is not a requirement.

Similarly for %i  and %pi in Maxima.

They follow the convention that these are constants,
and in particular should not be re-bound, or at least not without
careful thought.

Are there other constants that do not begin with %? sure.  you can
manufacture them. Would it be nice to begin them with %? maybe.
What about the wxmaxima typesetting in Greek... a slightly unfortunate
overloading of the % usage.

Are there non-constants that begin in %?  Apparently.  you can
manufacture them...

Does this mean the maxima evaluator (etc) should allow you to
explicitly  { in block([%pi] ....) }  or implicitly  {in plot or integrate}
re-bind %pi?   Probably not. in my opinion.
RJf


On 7/30/13 10:46 AM, Kris Katterjohn wrote:
> On 07/30/2013 11:22 AM, Robert Dodier wrote:
>> On 2013-07-30, Jaime Villate <villate at fe.up.pt> wrote:
>>
>>> Well, wxmaxima, sage and any other projects that use Maxima should
>>> follow the rules that Maxima developers has been using long before those
>>> projects appeared.
>> There aren't any such rules, so how could they follow them?
>>
>> There is nothing in the code to force names beginning with % to be
>> constants; there is no requirement that constants begin with %; there
>> is no documentation to suggest % be used only for constants.
>> (And before anybody suggests doing any of that, let me mention that
>> I'm against it.) Some existing packages, written by long-standing
>> Maxima developers, use % names for things other than constants.
> Plus there are the option variables %iargs, %piargs, etc.  While I
> assume that they are named for the constants %i, %pi, etc., they are
> still variables (defined in src/) whose names begin with %.
>
> Cheers,
> Kris Katterjohn
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima