MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: OOP in Mathematica

  • To: mathgroup at
  • Subject: [mg29154] Re: OOP in Mathematica
  • From: "Orestis Vantzos" <atelesforos at>
  • Date: Fri, 1 Jun 2001 04:15:20 -0400 (EDT)
  • Organization: National Technical University of Athens, Greece
  • References: <b3AP6.274$> <9f2g4c$878$> <9f4euh$ab2$>
  • Sender: owner-wri-mathgroup at

That's exactly why normal OOP philosophy can't work in Mathematica...methods
and instance variables (in Maeder's terminology) can not be clearly
distinguished. One would rather associate a number of symbols with an
objects and allow the user to define their functionality.

"John Doty" <jpd at> wrote in message news:9f4euh$ab2$1 at
> In article <9f2g4c$878$1 at>, "Jens-Peer Kuska"
> <kuska at> 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
> | Work: jpd at

  • Prev by Date: RE: I hate using Legend
  • Next by Date: RSA and Fixed Exponents
  • Previous by thread: RE: Re: OOP in Mathematica
  • Next by thread: Re: OOP in Mathematica