> -----Original Message-----
> From: [EMAIL PROTECTED] On Behalf Of Michael A. Stone
> Sent: Saturday, April 10, 1999 6:39 AM
> > ... a programer using perl could get the same work
> > done in say 50% of the time needed to do it in C.
> [Much good stuff snipped; anyone who writes code or commissions
> the writing of code should read it again, several times.]
> it's well documented that there are order-of-magnitude
> differences in productivity between programmers with identical
> resumes, working in the same language, and on the same project.
It's also well documented, though less widely known, that there
are similar order-of-magnitude differences in the maintainability
of code from different programmers, and lesser but still
significant differences in reliability. Programmers with high
scores in one of these areas are somewhat more likely to have
high scores in one or both of the others, but a single person
at the top of all three is still a very rare bird.
I personally find it extremely difficult to write maintainable
(readable, easy to understand) code in Perl and somewhat
difficult to do so in C/C++. Java is about the same, but because
you can use Ada anywhere you can use Java (as there are two
Ada 95 compilers that compile to Java byte codes), I rarely
write Java voluntarily. Ada, Modula, and Pascal/Delphi are easiest.
> in very broad terms, interpreted languages tend to be faster &
> easier for small ... programs, ... compiled languages,...
> tend to be better for large programs,
All quite true, except that any "compiled language" could certainly
be executed interpretively and most "interpreted languages" could
be compiled to pure machine code. (I published a paper on the
subject in 1966(!), describing the BRUIN language for which we had
a pure interpreter, an incremental compiler, and a pure compiler.)
It's a puzzle to me that no one has written a full optimizing
compiler for Java. Just-in-time (JIT) compilers translate JVM
byte codes to native machine code but do little if any
optimization, in part because information has been discarded
in the source-to-bytecode step. There is an order of magnitude
difference in speed between executables produced by bytecode/JIT
compilation and the same (Ada) source compiled directly by a
commercial optimizing compiler.
> ... meanwhile, the overhead of the interpreter increases
> geometrically with the program's size,
I don't think you meant "geometrically" in its formally-defined
sense. Overhead is actually linearly proportional to program
execution time (not size), it just becomes way more noticeable
and painful with big programs that take a long time to run.
> among the possible things that can
> be defined as 'good' in code are:
>
> [a list I might quibble with, but it's essentially on the mark.]
>
> most of which are mutually exclusive.
I hold out the hope that these things are not *intrinsically*
mutually exclusive, but it sure seems to work out that way
in practice.
> part of the implementation programmer's stock in trade is
> choosing the tradeoffs which fit the circumstances of the
> current project.
So true! Being a purist in any direction ("Perl is best;"
"COBOL is for Losers;" "Linux Rules;" "Microsoft Sucks;"
"Ada is The Greatest Language Ever.") is among the worst
mistakes you can make.
My rule of thumb for optimizing code for speed, memory size,
or storage size:
Don't Do It.
(For Experts Only): Don't Do It Yet.
Since I formulated that rule (1970s), speed, memory costs, and
storage costs have each improved by a factor of a thousand
or more and my salary has increased by the cube root of that.
Bob Munck
____________________________________________________________________
--------------------------------------------------------------------
Join The NEW Web Consultants Association FORUMS and CHAT:
Register Today at: http://just4u.com/forums/
Web Consultants Web Site : http://just4u.com/webconsultants
Give the Gift of Life This Year...
Just4U Stop Smoking Support forum - helping smokers for
over three years-tell a friend: http://just4u.com/forums/
To get 500 Banner Ads for FREE
go to http://www.linkbuddies.com/start.go?id=111261
---------------------------------------------------------------------