On Mon, Dec 14, 2009 at 10:31:14PM +0100, Jaap Spies wrote:
> Martin Rubey wrote:
> > Carlos Córdoba<ccordob...@gmail.com>  writes:
> >
> >> Anyway, the use of anonymous functions is mostly useful on constructs
> >> that operate over lists, like map and reduce. In 10 years of using
> >> Mathematica I've ever needed to derive this kind functions, but
> >> nevertheless I've checked if it's possible, and indeed it is, for
> >> example
> >>
> >> D[(#^2)&[x], x]
> >>
> >> gives 2*x.
> >
> > I don't think that this implies that anonymous functions are symbolic,
> > since (#^2)&[x] gives already x^2.  MMA's evaluation rules are tricky
> > though, I do not know whether D evaluates all it's arguments before
> > calling.
> >
> 
> I truly hope this 'hocus pocus' will never make it in Sage!
> 
> Jaap
> 

The whole discussion started with a suggestion for making the lambda
notation more mathematician-friendly (by making it closer to
mathematical notation).  Based on this, two comments:

1. I agree with Jaap that Mathematica's notation is by far less
human-friendly than the Python lambda.  It's really obscure.  Maybe it
makes sense when viewed as part of Mathematica's syntax, but it would
look really ugly and weird in Sage.  So, please no!

2. Going back to the original suggestion, which was to use ->: that's
not actually correct mathematical notation.  The right one is closer
to what Sage outputs (as Jason pointed out), i.e.

x |-> x^2

So if we're going to do anything in this direction, I would much
prefer this to x -> x^2 which is just plain wrong.



Best,
Alex


-- 
Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne
-- Australia -- http://www.ms.unimelb.edu.au/~aghitza/

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