Re: OOP in Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg29151] Re: OOP in Mathematica
- From: "John Doty" <jpd at w-d.org>
- Date: Wed, 30 May 2001 23:28:37 -0400 (EDT)
- References: <b3AP6.274$y25.1892@ralph.vnet.net> <9f2g4c$878$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <9f2g4c$878$1 at smc.vnet.net>, "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de> wrote: > The head *is* the function call! No, the head is just the head. If a particular head is associated with replacement rules that work like a function, you might want to call that head a "function". On the other hand, you can invert function and argument if you wish: In[33]:= x_[sin]^:=Sin[x] In[34]:= Pi[sin] Out[34]= 0 To be sure, most rules mimic function evaluation and/or sequential flow of control. This makes Mathematica look more like a "normal" programming language than it really is. It's really just a convention: Mathematica can also define bizarre rules like the ones above. -- | John Doty "You can't confuse me, that's my job." | Home: jpd at w-d.org | Work: jpd at space.mit.edu