Subject: Object Oriented Programming

From: "Gustavo A. Mercier Jr" <[email-masked]>
Date: Fri, 11 Jul 1997 09:58:35 -0400 (EDT)

Hi!

I **strongly** recommend the following book for those interested
in numerical applications and OO programming, particularly
if you come from the Fortran school. It lacks info on I/O stuff,
but it goes heavily on the differences/benefits/tradeoffs
between Fortran and OO as implemented under C++. It is also
a very practical book, no philosophical discussions here.

   Scientific C++
   Building Numerical Libraries the Object-Oriented Way
   Guido Buzzi-Ferraris
   Addison-Wesley 1993

One key point to understand is that there are different ways
to implement an array in C/C++. Amazingly, the book shows
how the approach used in the famous Numerical Recipes
books is not the most efficient, particularly for OO programming!

The book does not cover templates, part of the ANSI C++
standard. There is another book written by some IBM people
that is also intended for the Fortran crowd. It is also very good,
and does cover templates. It uses finite difference methods to
illustrate the principles of an object. Unfortunately,
I don't have the reference now! Contact me if you are interested.

As a final note...

I started with fortran, and moved on to Mathematica, then C, and
now C++. I still write some code in Fortran, simply because
some I/O stuff is easier to implement in Fortran. This reflects
the fact that the output is going into a program written
in Fortran that may be unforgiving regarding the format of the
input.

To move away from the procedural paradigm of programming was
not easy. Even Wolfram states this in the handbook to Mathematica.
Mathematica promotes a functional programming paradigm, although
it is easy to write code using procedural programming, and with
some effort OO programming. In retrospect, it was a great
way to move from Fortran to C++.

I must have read several books on programming, including a whole
book on just the concept of OO programming with no reference
to a specific programming language.

I am still learning. 

Has the change being worth while? Only time will tell! :-)
Not much experience, yet. Sorry! But, OO is the closest
I can get to a fast program that allows me to keep the "thinking"
I use with Mathematica. Unfortunately, unless I use
a predefined class library, I have to write everything from
scratch, a real pain. Moreover, a good knowledge of data structures
is key if you intend to take advantage of OO programming.

As KH states, I think Python is a great alternative, but I am
only now learning about it...

Still searching for a "nice" programming paradigm and its
associated language.

OO (with C++ or Python?) is getting there... 

Read Buzzi-Ferraris book and judge for yourself!

Bye!

-- 
                                      ("`-/")_.-'"``-._
Gustavo A. Mercier,Jr.,MD,PhD         (. . `) -._    )-;-,_() 
Division of Nuclear Medicine          (v_,)'  _  )`-.\  ``-
Dept. of Radiology                    _;- _,-_/ / ((,'
University of Pennsylvania           ((,.-'  ((,/
3400 Spruce St.                  [email-masked]
Philadelphia, PA 19104         215-662-3069/3091 fax: 215-349-5843

---

From: Gerald Loeffler <[email-masked]>
Date: Fri, 11 Jul 1997 17:37:50 +0200

Hi!

Just a remark since someone recommended two books:

Gustavo A. Mercier Jr wrote:
 ...
>    Building Numerical Libraries the Object-Oriented Way

I bought and read this book and in my humble opinion it is extremely
out-dated, misleading, badly written and simply serves the purpose of
teaching OO-programming to a scientific community not well! I can not
recommend it to anyone, actually.
Somehow its strange how two peoples perception of one and the same item
can vary...

 ...
> I don't have the reference now! Contact me if you are interested.

Thats
	Scientific and Engineering C++ : An Introduction With Advanced
Techniques and Examples
        by John J. Barton, Lee R. Nackman
        Hardcover, 671 pages
        Published by Addison-Wesley Pub Co
        Publication date: July 1, 1994

This on the other hand is a very thoroughly written text on C++ as it
will more or less emerge from the standardization effort (note: there is
no ANSI C++ standard yet!).
Furthermore, Lee and Nackman have a regular column in the "C++ report",
and definitely know what they are writing about.
It's also rather old by now and some details mentioned therein are not
strictly speaking C++ any more, but this should be no argument against
buying this book.
 ...
-- 

Gerald Loeffler
PostDoc in Theoretical Biophysics

EMail: [email-masked]
Phone: +43 1 79730 554
Fax:   +43 1 7987153
SMail: I.M.P. - Research Institute of Molecular Pathology
       Dr. Bohr-Gasse 7
       A-1030 Vienna
       AUSTRIA