|
|
scott wrote:
>> If all you're trying to do is sum all the elements in a list, neither
>> approach has a really compelling advantage or disadvantage. I used it
>> as an example of a simple task that anybody can easily understand, and
>> used it to illustrate the difference in mentallity between the two
>> approaches.
>
> I guess the difference would be in more complex examples then, when both
> the human C++ coder and the Haskell compiler have to work harder to get
> efficient code.
If all you're after is the ultimate machine efficiency, C can probably
still do that better than almost any other language, given enough skill.
But what about factors such as code size, readability, maintainability,
code reuse, polymorphism, etc etc etc?
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|