On Nov 14, 4:53 am, "Ondrej Certik" <[EMAIL PROTECTED]> wrote:
> On Fri, Nov 14, 2008 at 3:21 AM, Brian Granger <[EMAIL PROTECTED]> wrote:
>
> > I am a sympy newbie, but I do have some thoughts on this issue.  I am
> > not entirely opposed to the new notation, but I think it may be worth
> > considering more...
>
> > First, the new syntax is confusing two different things:
>
> > * Substitution syntax
> > * Functions and the function call syntax.
>
> > When I see f(2, 3), I think of evaluating a function, not of
> > substitution.  I don't have any real concrete evidence to support this
> > claim, but the clouding of these two things feels wrong.
>
> > Second, some versions of the syntax are horribly magic and confusing:
>
> > f = x*y*w*q
>
> > While passing things as keyword args is not too magic (and plenty explicit):
>
> > f(x=1, y=2),
>
> > passing things by position is a nightmare.  What on earth do the
> > following actually mean:
>
> > f(1)
> > f(1,2)
> > f(1,2,3)
>
> > The only way of resolving this is to agree upon some magic ordering of
> > symbol/atom names, which is, in my mind, way too implicit and magical.
> > Sure maybe it is nice to 1 or two arguments, but the general case is
> > pretty nasty.
>
> > The only way that I can imagine supporting the positional version is
> > something like this:
>
> > f.bind_positional_arguments(x, y)   # we could find a shorter name of course
> > f(1,2) -> f(x=2,y=3)
>
> > f.positional_arguments would return (x, y)
>
> > So, I would say that I am:
>
> > +1 on the keyword argument version f(x=1, y=2)
> > -1 on the raw positional version f(1,2)
> > +1 on a more explicit version of the positional version
>
> I agree with this. Let's implement
>
> the keyword argument version f(x=1, y=2)
> a more explicit version of the positional version
>
> first, and then see.

> Ondrej

There has been some pain in Sage due to symbolic expressions there
allowing to be called with positional arguments.  Have a look,
especially towards the end, at the long thread
http://groups.google.com/group/sage-devel/browse_thread/thread/f1286e92d4d2ce83#.
I think the conclusion, at least by some, was similar to yours, and I
also agree.  The keyword version is good, and the positional version
is bad.

Jason Merrill

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to