Don wrote:
The "everything should be in assembler"
(paraphrased) comment has
some merit -- you get to see what the machine is *really* doing
at your behest.
Personally I think it's more like "every programmer should have sufficient
knowledge of the compiler they're using". By "sufficient" I don't
mean that
they should know how it'll optimise things in every situation - but they
should have a working knowledge of what sorts of constructs will be targets
for optimisation.
I don't mind people using whatever language they want providing that it's
capable of being efficient for the task at hand - but they do need a knowledge
of how what they write will be converted into what the computer will actually run.
I found one piece of code that was literally counting
bytes
to determine the size of a file instead of stat(2)-ing it
(no, it wasn't a sparse file, special device, etc. ... just
a regular "box of bytes")
That's one of the things I don't like about languages like C and PHP - they
give you 14 different ways of doing any one thing, which makes the learning
curve needed to be proficient rather steep. I suppose it's a little like
comparing a RISC to a CISC CPU... some languages offer less flexibility and
more effort on the part of the programmer, but they tend to result in a
faster, more efficient product.
--
A. Because it destroys the natural flow of conversation.
Q. What's wrong with top posting ?