On Feb 24, 12:24 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > The problem basically goes back to this. If you want the following > to work: > > sage: f = sin(x) > sage: f(2) > sin(2) > > Then you *have* to also allow the following to work like this: > > sage: f(q,p) = q(2) + p(3) > sage: f > (q, p) |--> 5 > > This is really exactly the same thing. You've made a symbolic > expression q above and > by default those are callable. By calling it at 2 you get back "2". > > Another example: > > sage: f = sin(x)(3) > sage: f > sin(3) > > It is very convenient that this works. But it causes great confusion > to people who > try to use implicit multiplication notation. > > Comments? > > Changing this behavior would (1) require changing a huge number of doctests > all > over Sage, and (2) be a annoying to people who know what's going on and don't > think Sage does implicit multiplication. However, it would avoid a > lot of confusion > for certain new users.
As somebody who basically never uses Sage symbolics at all (so my vote maybe shouldn't count for much): I like the idea of getting rid of the idea that all symbolic expressions are implicitly callable; we have enough ways to explicitly call symbolic expressions. So my proposal would be: sage: f = sin(x) sage: f(2) BOOM -- error sage: f(x) = sin(x) sage: f(2) sin(2) sage: sin(x)(3) BOOM -- error sage: sin(x).function(x)(3) sin(3) sage: sin(x)(x=3) sin(3) Carl --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---