Jason's argument is interesting.  I'll think about that one; if good
math and good programming go together, it should probably be done.
Anyway, the decision is made.

But I'm not sure that x(x+1) being x+1 is as much of a problem; does x
(x+1) have any meaning in the current Sage framework other than
calling something?  Since one already has to use * for multiplication
in pretty much any context, this is a learning curve already met by
trying something like integrate(2*x).  f=x^2 versus f(x)=x^2 isn't in
the same category.

> However, what about plot(x^2, 0, 10)? I can see that plot(x^2, (x, 0,  
> 10)) would still work...

Same thing with integrate(x^2,0,1) versus integrate(x^2,x,0,1).  Is it
pretty easy to change plot/integrate/diff/etc. so that symbolic
expressions with one variable are automatically changed to callable
symbolic expressions in order to use these things?  It would be
unfortunate to lose this capability.

As for the polynomial/symbolic question, I understand the composition
argument.  This still seems weird to me, though, since polynomials are
really no more callable than single-variable symbolic expressions; in
fact, they ARE single-variable callable expressions of a particular
module form, don't you think?  It is case where len(f.variables())==1
that seems quite different to me, because as I mention above things
like x(x+1) already have no Sage meaning.

sage: R.<y> = ZZ[]
sage: g=y^2
sage: g(2)
4
sage: z=var('z',ns=1)
sage: h=z^2
sage: h(2)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call
last)

Especially because the distinction is not clear in the tutorial
regarding this.  Even the error message is a little unhelpful:

sage: 2x
------------------------------------------------------------
   File "<ipython console>", line 1
     2x
      ^
SyntaxError: invalid syntax

In fact, I can't find a reference to the fact that 2x should yield an
error in Chapter 2 of the tutorial; this and the distinction above
should be very prominent in that, because it will not be obvious at
all.  Will the tutorial, cookbook, etc. be available to edit via
hg_sage after the 3.4 transition?   Not that it be said I am unwilling
to help clarify all this to newcomers :)

- kcrisman
--~--~---------~--~----~------------~-------~--~----~
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