Al Boldi ha scritto:
Giuliano Colla wrote:
Which one is the best?
:
:
Among OOPL doubtlessly Pascal.
Why?
Well, Pascal syntax is much cleaner. It's been planned. C syntax appears
to have been made on the way. C (and C++) try to avoid typing as much as
possible, and this makes code much less readable. This means in the long
run more errors. Pointer arithmetic of C is simply a way to encourage
programmer errors. In Pascal you have one Interface section and an
Implementation section. They can't be inconsistent because the compiler
will tell you, and the Interface is what is used by all other units. In
C you have a source file and header files. Your program is the source,
but other units will use the header file. If they're inconsistent you'll
learn when debugging the program. If you fail to detect inconsistencies,
it'll be the end users to experience the trouble.
We have our main line of application which is made by some tens of
thousands lines in Delphi Pascal, and by a few thousand lines in C. It's
a code base we're using for a line of industrial controls, and the C
portion is required for the real-time part, which interacts with the
Linux kernel. We make a new version for each new control, roughly two a
month. Each time, during debug, there are many more errors in the C
portion, than in the Pascal portion, although the Pascal portion is ten
times larger. But Pascal errors are detected by the compiler, C error by
testers. I'm trying to see if the C section could be written in Pascal.
Just one more question: In another thread you said Java is ugly, what about
the language, and how does it compare to pascal?
I don't know enough about Java language to formulate a judgment. I've
never used it, and a casual glance to some source code isn't enough to
draw conclusions. I seldom used interpreters, because I've always been
looking in need of fast response.
Giuliano
--
Giuliano Colla
Whenever people agree with me, I always feel I must be wrong (O. Wilde)
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives