Jing Guo wrote:
>
> Pierre Hugonnet wrote:
> > [...]
> > - They want to build OO industrial applications (don't laugh please):
> > I'm afraid that software engineering is a profession, and that most of
> > scientists (including me) are simply not able to produce good OO code.
> > the point is not only the knowledge of the syntax...
> >
> >
> > I'm sure that the best way is to write scientific code with Fortran,
> > and then to let competent people to encapsulate it in big
> > applications, which without any doubt need an OO langage.
>
> However, often the most competent people who will/can encapsulate
> the scientific code into big applications, are the people who
> developed the original code.
>
>
Object-oriented programming is without any doubt an important
achievement in computer science, but for scientific and engineering
programming, a OO language tailored for that need (i.e. Fortran 2000)
is certainly preferable to another built on top of a language designed
primarily for systems programming (C++).
OOP is not a concept highly difficult to grasp in itself. F90 already
implements some of the concepts (encapsulation, information hiding and
static polymorphism). If a person masters fully F90 modules and data
abstraction , the only things that remain to be learn will be
inheritance and dynamic polymorphism (run time binding).
What is difficult, however, is the way OOP is done in C++.
It is generally agreed that the learning curve of this language is
very steep and a few years of usage is needed before being efficient
is using it to its full extent. One of the sources of these difficulties
is the low level pointer concept bring from C. And recourse to these low
level pointers is an integral concept in C++ as in C.
By contrast, Fortran 95 + inheritance + dynamic polymorphism (F2000)
would be easier to use.
The evolution of programming languages should lead to the development
of languages that are easy to use and offer a level of abstraction that
is close to the problems to be solved. And C++ fails to meet the first
condition. It meets the second but with large efforts required from the
programmers.
For this reason, the development of F2000 should be highly encouraged.
It would be very disappointing if scientific programming had to be done
in a more or less distant future in a difficult language such as C++.
And Roger Glover wrote:
>> I admit that C++
>> has rather more operators than Fortran,
>No doubt about it, that is a definite advantage for C, one that
>I think you are seriously underestimating in your subsequent text.
But these extra operators are artificial, not very intuitive, and have
no meaning outside of the C/C++ world. The precedence rules among them
are arbitrary and difficult to remember. Look at the number of articles
published in the C/C++ Users Journal that just explain the way to
decipher the precedence rules.
Overloading operators such as:
+= -= ++ -- >> << & && ~
doesn't lead to code that is easy to understand. The >> and <<
operators applied to streams have some graphic sense, but their extended
definition is far from being the left shift and right shift usage
they have in C.
F90 defined operators have the advantage of being textual, thus self
explicit.
Regards,
Jean Vezina
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|