On May 11, 3:53 am, Keshav Kini <keshav.k...@gmail.com> wrote: > Nils Bruin <nbr...@sfu.ca> writes: > > On May 11, 12:16 am, Simon King <simon.k...@uni-jena.de> wrote: > >> IIRC, the canonical answer to the request "do not predefine x" is: > >> "That's not gonna happen, because way too many people expect to have a > >> variable x handy." > > > Or perhaps: > > > "If you don't like x predefined, then put the command 'del x' in .sage/ > > init.sage". > > > While reasonable defaults are nice to have, it's even more important > > to make it easy for people to tweak the setting to their liking -- and > > it is easy. > > I think those two goals are sort of orthogonal. My objection to > predefining x is not because I personally find it annoying to have it > defined. Actually I find it useful too. It's the predefinition of x *as > a default* that bothers me, because of what it suggests about our > official system design specs. Conversely I'm sure you can imagine that I > have stuff in my init.sage which I would never argue for making a > default setting. So "If you don't like x predefined then get rid of it > in your init.sage" does not really address my complaint, I think. > > Oh well. > > Also in regards to your wording "reasonable defaults", I would point out > that defining x as a variable is not exactly a choice of a default for a > setting. Choosing to make n() output 53 bits of precision unless > otherwise specified is a default - it's a choice of one setting among > many possible choices, all of which are more or less equally plausible > to some extent. Choosing to make polynomials print in grevlex term order > is also a default. Predefining x as a symbolic variable, on the other > hand, is a bolt from the blue and not a default setting chosen among > similar other options. I think that makes it more reasonable to talk > about changing or removing it. >
Well, Sage has many constituencies, and this discussion is quite old. In Sage terms, REALLY old. http://groups.google.com/group/sage-devel/browse_thread/thread/74a0aad809edd5c4/19fae110d7a2e970 Naturally, it's come back various times. For me, it comes down to this: sage: plot(x) # okay sage: plot(y) --------------------------------------------------------------------------- NameError: name 'y' is not defined There should be at least one thing that a user who has never heard of "variables" in computers can do without var or actually defining a function. sage: f(x) = x sage: plot(f) # works but two liner to plot even the simplest non- constant function I've introduced this concept to probably hundreds of people in many talks, workshops, and Joint Meetings discussions, and I have a strong suspicion that dumping 'x' will lead to more dumps of Sage than you think - by those who are not yet using it but are starting to finally consider it. To be honest, the var('y') is already a hard sell, though one I've learned to just barely justify to users. (For similar reasons, I never understood why Maple required "with(plots)" or something silly like that to plot; it doesn't take much marginal effort required for a lot of people without CS background to figure it's not worth it - see the iPhone for a product that understands this.) Notice that some people in the thread referenced above want us to import nearly everything explicitly; well, that's probably what sage - ipython is for, I suppose. Anyway, be careful what you wish for - see Robert Bradshaw's comment in that thread about having to remember which notebook cell defined a given thing. In the same thread, by the way, the following is introduced by William. $ export SAGE_IMPORTALL="no" $ ../../sage ---------------------------------------------------------------------- | Sage Version 5.0.beta14, Release Date: 2012-04-27 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- ********************************************************************** * * * Warning: this is a prerelease version, and it may be unstable. * * * ********************************************************************** sage: x --------------------------------------------------------------------------- NameError: name 'x' is not defined Presumably this could even be added as a command-line switch, like $ sage --noimport or something, and that would solve 99% of the problem for 'practical CS-aware users'. Or? - kcrisman -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org