[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Low-level vs. High-level programming (was My First Computer)



"Kevin Lawton" <kepla@btinternet.com> wrote in message
news:bcplc6$b5e$4@titan.btinternet.com...
> One thing I have noticed is that
> programming languages seem to evolve to absorb the processing power
> available to them. Assembler and C are massively powerfull and efficient,
> but require much skill to use properly. The result is small fast programs
> which can get the best performance out of the hardware they are running
on.

In my opinion, *programs* can be fast and efficient; programming languages
themselves are rather neutral.  For example: a good programmer can implement
a fast and efficient algorithm in Java that would outperform a bad algorithm
in C.

By the time you figure in development time (writing a web server in assembly
will likely take a lot more time than writing a web server in Java) and
account for best usages in each language (I'll probably spend more a lot
more time analyzing when data is allocated and freed in C than in Java), I
find Java isn't all that inefficient for my desktop and server programming
needs.  Use the right tool for the job at hand: for a lot of my unix
programming I use Perl - sure, it's grossly inefficient, but for parts of my
system that doesn't need to run fast, perl is very convenient.  I use C when
performance is an issue.  When I have Unix systems too small to support
Perl, I use AWK or Bourne shell.

> Java, HTML, etc are barely 'coding' at all - they are more like a
technical
> specification of a program than the program code itself - the result being
> that the computer has to do far more work at runtime to sucessfully
execute
> the program.

HTML doesn't describe computation - it's a markup language for web pages;
what exactly did you mean?  JavaScript?  ASP?

Java isn't much different than C when it comes to expressing computation.
In neither case can I say something like:
  given an array a[0..i]
  return a[0..i] such that for all j=0..i-1, a[j] <= a[j+1]
and have the compiler magically cough up a sort routine.  Are you thinking
about functional languages like Haskell and SML?  I've seen quicksort as a
one-liner in Haskell.

Kelly