[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Best way to handle matrixes with Oberon
Hello everybody,
After much hesitations, I decided to employ Oberon-2 in addition to
(or instead of ?) the C language in my job concerned with molecular modeling
and simulation.
As a matter of fact, although I am very fond of brave old C, I happened
to meet with difficulties when working with many different students of
mine over several years with it, the code being difficult to maintain.
I find Oberon-2 very attractive, but I was reluctant because it seems
to be completely ignored in the chemical physics community.
Moreover, I am displeased by a few details. For instance, I find it
very natural to start indexes and ONE instead of ZERO for arrays and matrixes,
much employed in numerical schemes. In C, I simply shift the pointers,
along with casts for multidimensional arrays - and everything works fine.
However, it seems that such pointer arithmetics is not consistent with
more modern approaches to programming ? The correct approach might be to
access every element of the matrix or vector through a user-defined method,
but it implies a heavy syntax and - more seriously - I fear it would not
be very efficient.
I guess that the possibility to start at arbitrary indexes should not
be a relevant feature as it has been removed in Oberon-2, but what is the
best (CONVENIENT and EFFICIENT) approach instead ?
Best regards
Didier
--
Didier MATHIEU
CEA - Le Ripault, BP 16
37260 Monts (France)
Tel. 33(0)2.47.34.41.85