Em Dom, 2009-03-15 às 17:11 -0700, kcrisman escreveu:
> 
> > Wouldn't it be clearer if the error message read
> >
> > NameError: name 't' is not defined, try  var('t')  beforehand
> >
> > or something similar?
> >
> > Perhaps as Carl deprecates common anticipated behaviors he'd be open
> > to having his patch adjust the permanent error messages (not just the
> > deprecation warnings) to give advice on the correct syntax/usage when
> > possible.  I'm starting to see some of this in Ubuntu Linux and the
> > error messages are giving hints that took me hours to discover on my
> > own a couple years ago.
> 
> This is an excellent idea no matter what is happening with variables,
> assuming that this particular error message is usually the right
> response to this NameError.  That's when I see it, but I assume there
> are other times this NameError also appears.  Otherwise this sounds
> like a ticket to open.
> 
> > With a little python magic, we can work around this.
> > sage: def f(x,y):
> > ....:     return x + x*y
> > ....:
> > sage: f.func_code.co_argcount
> > 2
> > sage: f.func_code.co_varnames
> > ('x', 'y')
> >
> > We could write a wrapper that takes a python function, and returns
> > another one that takes keyword arguments. Then the plotting code would
> > use this wrapper as a preprocessor before doing anything with python
> > functions.
> 
> Certainly it makes sense to make this *possible*!  Sure - absolutely,
> there should be options, consistency should be possible if we can do
> it.
> 
> But it just seems weird to me to choose consistency as the overriding
> factor, to the point of deprecating *unambiguous* functionality that
> already exists and does not cause problems (e.g. plot(x^2,0,1) or
> integrate(x^2,0,1) ).

I agree. As a member of the non-math-teacher part of this list, I must
agree that plot(some_single_var_function_or_expression, 0, 1) should be
considered as valid input.

I believe that as Sage wants to take over the world, it shouldn't be
usable only by Math professionals, but also common people like me, which
don't even know what is a Symbolic Ring is.

OK, I concede that the docs could help with that, and that consistency
is desirable, but that doesn't mean we should always copy Mma. Do we
want to be better or just a clone to it? What exactly is the user target
of Sage? Only math teachers doesn't count as "the whole world" for me.

By the way, to be more explicit, I think the better option would be to
allow single-variable functions or expressions to be plotted directly
without the need (but allowing) to use variable specification in the
range, regardless if the variable is x or anything else, provided
there's only one.

About the xmax, xmin, etc, I think the vmax, vmin, hmax, hmin proposed
before could be used at least for cartesian plots, since vertical and
horizontal directions are common for any used variable. I don't believe
there could be much confusion about that if it's properly described in
the documentation (including plot docstrings). Also, that whould allow
easy porting of old code. Anyway, the xmin, ymax, etc *shouldn't* be
that much confusing anyway, since one must remember that, for example,
Matlab uses semilogy/semilogx functions to specify which axis
(vertical/horizontal) is the logarithmic one (Mma doesn't even have a
way to plot a linear-log plot, at least from a quick glance of the
online docs and not counting more elaborate hacks which I wouldn't
know).


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to