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

From: "W. R. Smith" <[email-masked]>
Date: Thu, 10 Jul 1997 19:01:14 -0400

Hello,

        Who says FORTRAN cannot be "object-oriented"?  How about Windows
FORTRAN .DLL's, or other types of FORTRAN libraries?  Please enlighten me
if I'm off-base, but it seems to me that the entire "object-oriented thing"
is simply a modern version of what we used to call a "subroutine" in
FORTRAN.  The only difference is that one must adopt an accepted convention
to define the ways in which the "object" \equiv "subroutine" communicates
with the outside world.

At 11:10 AM 7/10/97 +0200, Konrad Hinsen wrote:
>> FORTRAN still remains the main programming language of computational
>> chemistry. But 
>> I wonder if anybody knew about the programs where methods computational
>> chemistry and, in particular quantum mechanical (ab initio or
>> semiempirical), MM or QM/MM force field methods are developed by means of
>> object-oriented languages (C++ preferably). I know Hyperchem is announced
>

-- W. R. Smith, PhD, P. Eng., Senior Scientist, Mathtrek Systems --
3-304 Stone Road West, Suite 165, Guelph, Ontario CANADA N1G 4W4
EMail: [email-masked]       Tel:519-763-1356,FAX:519-763-4525
--------------------- http://www.mathtrek.com ---------------------
-Mathtrek Systems - Home of EQS4WIN Chemical Equilibrium Software -

---

From: Taisung Lee <[email-masked]>
Date: Thu, 10 Jul 1997 21:13:00 -0400 (EDT)

Hi,

    Correct me if I am wrong.  

    Object-oriented is a style of programming.  FORTRAN can do 
almost anything that an object-oriented language can do.  However, it 
doesn't mean it can be object-oriented.  

    The reason to use object-oriented languages is to simplify the task 
of programming.  For example, FORTRAN77 can not define a private 
subroutine.  Each subroutine is global.  Thus you need to check every 
subroutine name before you write a new one.  Experts reading CCL should 
be able to provide more simple examples.

   About .DLL libraries in Windows, they are objects, but not 
full-function objects.  In FORTRAN there is no way to construct or 
destruct a subroutine in the run-time.  You can not make many copies of 
one subroutine.  There is no virtual function/overload function calls in 
FORTRAN.  Certainly you can not define templates for subroutine....

   If you have learned C++, you will find how different it is from 
FROTRAN.  As I know, it is more difficult for those who already know 
FORTRAN to learn C++ than those who don't have any programming 
experience.  Just because they are totally different worlds.

   In my opinion, most of program packages for computational chemistry 
are very difficult to modify when the program is big.  The main reason 
is they are written in FORTRAN.  The source code of MS-Windows NT is 
more than 1,000,000 lines.  I don't believe anyboday on the earth has 
the ability to write a working FORTRAN program with 1,000,000 lines. 

Taisung Lee
Research Associate
Dept. of Chemistry
Duke University