I had told myself to leave when things get flamy, but this is hard to
walk away from, so just a few words. (Muhahahaha..)
On Wed, Sep 30, 2009 at 6:01 PM, Kapil Hari Paranjape <kapil@xxxxxxxxxxx> wrote:
That is certainly true. There are indeed a large number of goodThis is so not true! There are tons of very hairy C (by which I mean
programs written in C --- however, even those programs would be
almost un-understandable if the comments are stripped out!
The kind of things you talk about, like assigning a char to an intThere is much merit in your words above, but it's like saying "you
and so on are _precisely_ the things that make the language difficult
to understand since one has to run a small compiler + semantic
analyser in one's head to keep track of programs that do that.
Readable code is not necessarily efficient. For example, in Haskell,It is readable because you understand the syntax. Since I have only
one definition of the list of primes is:
primes :: [Integer]
primes = sieve [2..]
where sieve (p:xs) = p : sieve [x | x<-xs, x `mod` p /= 0]
This is almost exactly the mathematical definition of the Sieve of
Eratosthenes written thousands of years ago! So it is very readable
(comments are not required!). However, it is not an efficient program!
Hope this clarifies --- and douses the flames a bit!I hope the same, clarification and flame dousing, and world peace,