MathGroup Archive 1999

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

Search the Archive

Re: OOP in Mathematica -- please help a newbie

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20359] Re: [mg20347] OOP in Mathematica -- please help a newbie
  • From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
  • Date: Sun, 17 Oct 1999 03:01:47 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

I guess this explains the source of all your other problems with OOP. 
(Unfortunately I saw this message only after I had replied to the others).
You should not evaluate a package like you do with a Notebook. You should
load it using a Get or Needs command. I think you should first study about
the use of packages and contexts in Mathematica before turning to other
matters.

You are wrong about the Mathematica Book. Here is the relevant passage from
section 2.4.10:

You can think of upvalues as a way to implement certain aspects of
object-oriented programming. A symbol like quat represents a particular type
of object. Then the various upvalues for quat specify "methods" that define
how quat objects should behave under certain operations, or on receipt of
certain "messages".

As you can see object oriented programming is mentioned and thus the master
index is perfectly right. That this may not be of much help to you is quite
a different matter.
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp


----------
>From: Joe Strout <joe at strout.net>
To: mathgroup at smc.vnet.net
>To: mathgroup at smc.vnet.net
>Subject: [mg20359] [mg20347] OOP in Mathematica -- please help a newbie
>Date: Sat, Oct 16, 1999, 13:47
>

> I'm trying to discover if and how Mathematica supports object-oriented
> programming.  I just got v4.0, and a search in the master index points
> me to the Mathematica Book, section 2.4.10.  But clicking the link
> jumps me to the bottom of that page, and scrolling up to that actual
> section, I find it's called "Associating Definitions with Different
> Symbols" and there is no mention of object-oriented programming.
>
> Is there a bug in the master index, or do I need to read between the
> lines, or what?
>
> I also downloaded "Classes.m" from MathSource, a package from 1993
> which claims to add OOP capability to Mathematica.  I opened this in
> Mathematica and did "Evaluate Notebook"; it generated a number of
> warnings (which now, for some reason, seem to be gone -- but they
> appeared to be mostly similar-name warningns).  Is this what I should
> be using, or is this now obsolete?  (The warnings, and the fact that
> it's from 1993, make me suspicious.)
>
> Thanks for any pointers!
> -- Joe
>
> --
> ,------------------------------------------------------------------.
> |    Joseph J. Strout           Biocomputing -- The Salk Institute |
> |    joe at strout.net             http://www.strout.net              |
> `------------------------------------------------------------------'
> Check out the Mac Web Directory!    http://www.strout.net/macweb.cgi
> 


  • Prev by Date: Re: add to wishlist
  • Next by Date: Re: Differentiation wrt functions in Mathematica
  • Previous by thread: Re: OOP in Mathematica -- please help a newbie
  • Next by thread: Re: OOP in Mathematica -- please help a newbie