On Sun, Mar 29, 2009 at 5:27 AM, Burcin Erocal <bur...@erocal.org> wrote: > > Hi again, > > This is the last in the series of symbolics related emails today. :) > > I'm looking for comments to trac #5607, which has this summary: > > > In a comment to #5413 Jason pointed out the following confusing > behavior: > > sage: g(x)=sin > sage: g(3) > sin(3) > sage: g(x)=sin+x > sage: g(3) > sin + 3 > > sage: g(x)=sin+cos; g(3) > sin + cos > > I think the syntax for this should be: > > sage: g(x) = sin(x) + 3 > sage: g(3) > sin(3) + 3 > > sage: g(x) = sin(x) + cos(x) > sage: g(3) > sin(3) + cos(3) > > Since it is not clear which variable to use if only sin is specified. > Also consider this situation: > > sage: g(x,y) = sin + y > sage: g(3,4) > ??? > > We have two options: > > * We could allow this syntax for convenience: > > sage: g(x) = sin + x > > and convert the function arguments to appropriate callable expressions > if the number of arguments of g match the number of arguments of the > given function, raise an error otherwise. > > * We raise an error whenever a function object is specified without > variables. > > Comments?
I also vote for +1 for raising an error, because: (1) explicit is better than implicit (2) I have no idea what "g(x)=sin+x" or "g(x,y)=sin+y" mean anyways. -- William --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---