Subject: Re: CCL:Object-oriented means for computational chemistry

From: "David E. Bernholdt" <[email-masked]>
Date: Fri, 11 Jul 1997 11:15:52 -0400

There have been a lot of interesting and useful messages in this
thread, but I think there is a core point that hasn't been emphasized
enough:

There is a difference between what I will refer to as "object-oriented
design" (OOD) and "object-oriented languages" (OOL).  I am
intentionally avoiding the phrase "object-oriented programming"
because I think it muddies the distinction.

According to Booch ("Object-Oriented Analysis and Design"), the four
basic elements of the object model of programming are
o Abstraction -- extracting the essential characteristics that
  distinguish one object from another.
o Encapsulation -- serves to separate the outside world's interface to
  and abstraction from its (internal) implementation
o Modularity -- being able to decompose a system into a set of loosely
  coupled modules.
o Hierarchy -- ranking or ordering of abstractions.

At a basic level, these are little more than the ideas of what constitutes
"good programming" that most of us have heard or read about from time
immemorial, and which most of us (based on chemistry code I've seen)
largely ignore.

One can DESIGN software based on these principles (OOD) regardless of
what language the software is to be implemented in.

There are some languages around these days which support (or enforce)
an object-oriented model to a greater extent than others.  These we
might refer to as object-oriented LANGUAGES.

The problem with the popular phrase "object-oriented programming" is
that people tend to lump the DESIGN and the IMPLEMENTATION together
when they think of PROGRAMMING.  In a discipline where Fortran remains
the dominant implementation language, the distinction is important.
Most people would agree that even Fortran90 is not an OOL.  However it
is most definitely possible to implement OOD software architectures in
Fortran (and other non-OOLs).  It takes more care and discipline.  It
may take more time, because it implies a serious effort at design,
which I don't think a lot of people pay much attention to.  I
definitely think the benefits are worth it.

The NWChem parallel computational chemistry package
(http://www.emsl.pnl.gov:2080/docs/nwchem/nwchem.html) was developed
using OOD principles and implemented in a mixture of Fortran and C. It
is on the order of 700,000 lines of code, and it works (contrary to
the opinion someone else expressed about being unable to create a
Fortran code so large).  We made a carefully-considered decision to go
this route rather than using C++ at the time the project began.  I
think we would make the same decision today, though that doesn't mean
that it might not change down the road.

I disagree with the person who proposed C++ is "the" langauge for
future work because it is an OOL.  There are a lot of other
considerations that (should) factor into the decision of which
language to use.  However I think that ALL projects should consider
object-oriented DESIGN regardless of implementation language.
--
David E. Bernholdt                      | Email:  [email-masked]
Northeast Parallel Architectures Center | Phone:  +1 315 443 3857
111 College Place, Syracuse University  | Fax:    +1 315 443 1973
Syracuse, NY 13244-4100                 | URL:    http://www.npac.syr.edu