On Dec 6, 2006, at 8:50 AM, William Stein wrote:
> On Wed, 06 Dec 2006 01:15:58 -0800, Joel B. Mohler
> <[EMAIL PROTECTED]> wrote:
>
>> Here's my fantasy:
>> ** which doesn't need the pre-parser
>> ** which is (I believe) realistically doable with careful design
>> sage: x,y=vars('x,y')
>> sage: f=Function( (x,y), sin(x) ); f
>> (x,y) -> sin(x)
>> sage: f(0,12)
>> sin(0) # whether this is 0 or sin(0) is not important to my
>> fantasy
>
> It's unclear to me why we need callable functions as a separate new
> construction, when Python already has a notion of callable functions.
> I.e., why is this not enough for you already?
>
> def f(x,y):
> return sin(x)
>
>
> or even
>
> f= lambda x,y: sin(x)
>
> What's the advantage of what you're proposing over what's already
> there?
>
> William
The main difficulty with def/lamdba is how would one do calculus with
one of these functions?
--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---