On 12/2/06, William Stein <[EMAIL PROTECTED]> wrote: > > On Sat, 02 Dec 2006 11:56:33 -0800, Bobby Moretti <[EMAIL PROTECTED]> > wrote: > > > > > On 12/2/06, William Stein <[EMAIL PROTECTED]> wrote: > >> > >> We might want to pre-define formal indeterminates a,b,c,...,z on > >> startup of SAGE, so users can use any of them in such expressions. > >> > > > > I'm not sure I like that idea... but I don't really know of an > > alternative. Is there any way for SAGE to guess that someone is using > > a given variable as an indeterminate? > > Without the preprocessor it is impossible, since it's simply a syntax > error in the language. > > > Possibly using the preprocessor? > > Even with the preprocessor it would be impossible (or insanely slow), > since the proprocessor has no state information (as well it shouldn't). > Use of the preprocessor should be avoided if at all possible, and them > some. > > > > That way we could define the indeterminates naturally, on the fly, > > emulating how my favorite little CAS (the one that comes on the TI-89 > > calculators) handles it. > > No. SAGE is not going to do this. A predefined list of variables, e.g., > a,..,z, A,...,Z I would consider. I won't totally change the language > semantics of Python. That SAGE almost completely works within the > framework > of Python is one of its critical distinctions, and I won't sacrifice it. > Whatever solution we come up with for making it easy to use SAGE for > math, it has to work within that design constraint. > > -- William >
These are all good reasons... I wish there was a better way than having a predefined list of indeterminates... I could see all sorts of things being screwed up that way. People will assign other types to, say x, and then go ahead and call integrate(sin(x), x) again, and will be very surprised by the result... although maybe that's an acceptable 'gotcha'. -- Bobby Moretti [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---