Robert Bradshaw wrote:
> On Dec 14, 2009, at 12:15 PM, Dag Sverre Seljebotn wrote:
> 
>> Robert Bradshaw wrote:
>>> On Dec 14, 2009, at 11:43 AM, Carlos Córdoba wrote:
>>>
>>>> I have to agree with Marshall, because it could be confusing for new
>>>> sage users that come from python to see such a different syntax
>>>> meaning.
>>>>
>>>> But what about the Mathematica syntax? Could it be adopted by sage?
>>> The Mathematica syntax is (in my opinion) much less Pythonic than
>>> using "->" in this context, even if the latter will have another
>>> meaning in Python 3.
>> Does the CAS syntax really mean Python "lambda" though?
> 
> Thanks for bringing up this point. No it doesn't, and shouldn't if we  
> adopt this syntax.
> 
> - Robert


This also makes the case that maybe using something like |-> isn't that 
far out for us, since we *already* have a preparser rule that converts

f(x)=x^2

to

__tmp__=var("x"); f = symbolic_expression(x**Integer(2)).function(x)

So

(variable list) |-> expression

translated to:

symbolic_expression(expression).function(variable list)

is sort of a natural extension of this.  Of course, we need to worry 
about creating variables and introducing them into the namespace.

Jason

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

Reply via email to