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. > The problem is that most CAS are functional in nature and the first > thing one tries to do in Sage is to translate one's old Mathematica, > Maple, etc, programs to python. For example, I was accustomed to > write one-liners that did a lot of stuff with maps over lists. But > the lambda keyword is somewhat discouraging because it makes your > code look overwhelmed and ugly. I have seen that people use it in > python to write very simple functions. Now most people use list > comprehensions, which are nice but not so much if you want to > compose to or three functions at a time. > > Just my two cents, > Carlos > > 2009/12/14 Marshall Hampton <[email protected]> > I felt ambivalent about adding the "->" until this point. If "->" is > going to mean something else in python eventually, it seems like a bad > idea to overload it in a Sage-specific way. > > -Marshall > > On Dec 14, 10:01 am, Dag Sverre Seljebotn > <[email protected]> wrote: > > > > > Note that -> gets a meaning in Python 3, to annotate the result of a > > function: > > > > def foo(a: int) -> float: > > ... > > > > I don't think this is a technical problem as one can rely on the > > statement to start with "def", but at least -> already means > something. > > > > Dag Sverre > > -- > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > > -- > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
