MathGroup Archive 2005

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

Search the Archive

Re: Mathematica Programmer vs. Programming in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63092] Re: [mg63082] Mathematica Programmer vs. Programming in Mathematica
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Wed, 14 Dec 2005 04:35:55 -0500 (EST)
  • References: <200512130841.DAA08238@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 13 Dec 2005, at 17:41, Steven T. Hatton wrote:

> Has anybody read both of Roman Maeder's books _The Mathematica  
> Programmer_
> and _Programming in Mathematica_?  I specifically mean the out of  
> print
> first volume of the former.  Dose _The Mathematica Programmer_ give a
> significantly different perspective than what is presented in  
> _Programming
> in Mathematica_?
>
> It is, I believe, the best source for information about the design  
> of his
> Classes` package.  The only other source I am aware of is an  
> unavailable
> (other than buying the hardcopy) back issue of The Mathematica  
> Journal.
> And, if my understanding is correct, that is not as complete as the
> discussion in his book.
> -- 
> The Mathematica Wiki: http://www.mathematica-users.org/
> Math for Comp Sci http://www.ifi.unizh.ch/math/bmwcs/master.html
> Math for the WWW: http://www.w3.org/Math/
>

I have read all three of these. I also have the issue 3.1 of the  
Mathematica Journal.

This gives me an opportunity to make a correction. I have mentioned  
that  Maeder's classes package is used in Gray's book "Mastering  
Mathematica", but now I checked it and found that he does not  
actually explain the package but shows various examples of its use.  
Here are a couple of quotes from Mastering Mathematica:

"There are enough subtleties involved in object-oriented programming  
to fill many books. Two that are very useful are [Budd] and [Meyer].  
For a complete theoretical treatment, see [Abadi and Cardelli]. In  
this chapter we shall just explain the evolution and use of Maeder's  
implementation by means of some very simple examples. Section 2 is  
intended as motivation for the material in Section 3. In it we follow  
Maeder's discussion in [Maeder 2] of how to shift attention from the  
functions to the data. In Chapter 13, graph theory will be developed  
in a strictly object-oriented framework, in the hopes that a single  
comprehensive and comprehensible example is worth a hundred pages of  
philosophy."

"The key concepts in OOP are object, class, message, inheritance,  
new, self, and super. These are all implemented in Maeder's package  
Classes.m from [Maeder 3]. We won't attempt to explain how this  
package works. Suffice it to say that it is an ingenious combination  
of all of the facilities that are available in Mathematica, based on  
the ideas discussed above. The package is included in the diskette  
supplied with this book and will repay careful study. After some  
preliminary examples showing how to use inheritance, we will use the  
package to set up a small hierarchy of classes involving points. "

Both volumes of "The Mathematica Programmer" are very different from  
"Programing in Mathematica". The latter book is actually devoted  
entirely to writing Mathematica packages and isn't a particularly  
good guide to other aspects of Mathematica programming (it was the  
first book on Mathematica programming I ever read and I don't think I  
learnt very much from it).   Both volumes of the Mathematica  
Programmer are collections of Maeder's articles, most of which  
appeared in The Mathematical Journal, and concern a large variety of  
topics, some of which are quite mathematical. (I think my favourite  
is the UniformPolyhedra package form the Mathematica Programmer II,  
which I have used in many of my lectures).
The classes package is explained in Volume 1 of the Mathematica  
Programmer and of course in the Mathematica Journal article. The  
explanation is pretty compressed: less than one page long.
The package is used again in Maeder's book "Computer Science with  
Mathematica" in the chapter on object oriented programming but again  
Maeder writes that the exact way how is works is irrelevant and  
refers the interested reader to the Mathematica Programmer.

Andrzej Kozlowski


  • Prev by Date: Re: Re: Solve Limitations
  • Next by Date: Re: Re: Solve Limitations
  • Previous by thread: Mathematica Programmer vs. Programming in Mathematica
  • Next by thread: Re: Mathematica Programmer vs. Programming in Mathematica