2008/11/2 William Stein <[EMAIL PROTECTED]>: > > On Sun, Nov 2, 2008 at 10:57 AM, Robert Dodier <[EMAIL PROTECTED]> wrote: >> William Stein wrote: >> >>> I personally Python well suited to mathematical computation, > > Wow, I omitted a lot of words from that sentence. > >> No problem with any computation involving literal objects. >> It's the symbolic stuff that's lacking. >> >>> and at least the approach in Python regarding undefined variables >>> is consistent with every other general purpose programming >>> language I've ever used. >> >> Well, this is an opportunity for Sage to do something usefully >> different, then. > > Sage has done something different, which is to be consistent > with many mainstream general purpose programming language > (by which I mean languages such as Java, Python, C#, etc.) > >> >>> But it is definitely different than Mathematica. >> >> Apparently Maple also does not require variables to be declared >> (to judge by their quick start guide). Neither does Maxima/Macsyma >> nor MuPAD nor PARI/GP ftr. > > That's right -- many of the special purposes math languages don't > require variables to be defined. A notable exception is the Magma > which requires variables to be define before using them. > >>> What is wrong? That statement Justin made or that he made it at all? >> >> It's a classic strawman. There's no evidence whatsoever in the >> original message that the o.p. (Seberino) has assumed that he knows >> "all there is to know about how to use a Computer Algebra System". > > Well just for the record I know the o.p. personally, I he is an > extremely well intentioned and considerate person, and > I hope he doesn't take any offense to Justin's > also (I hope) well meaning remarks. > >>> The first line of section 2 of the tutorial (about calculus) is >>> "The solve function solves equations. To use it, first specify some >>> variables; >>> ..." and gives an example of using var. >>> >>> I guess this suggests that one needs to use var. This would >>> be a good place in the tutorial to insert a sentence that if you >>> don't use var then you will get a NameError, and that this >>> behavior is different than in Mathematica, and there is no >>> mode to change this, since it's a basic feature of how the Python >>> language works. >> >> Well, that would be an improvement. The need to declare variables >> is different from various other packages, not just Mathematica. Some >> explanation should go in the documentation for var itself as well. >> >> FWIW > > OK, let's do that. >
How much of the problem would go away if the standard startup file had var('a b c d e f g h i j k l m n o p q r s t u v w x y z') in it? So that var() only had to be used explicitly for longer variable names? John > William > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---