
Perhaps is much easier to create one line compositions of functions in
haskell rather than in C because the type system helps a lot in the process.
However, reusability of source code and maintainability has never been taken
seriously by haskell programmers, simply because there are no industrial
projects in Haskell with dozens of people with different skills that come
and go. Because that, probably the early C programers were far more
exhuberant than the current C++ and Java programmers now. To have a broad
base of users and/or to assure a cheap programmers for your industrial
application has the servitude to "the rule of least power". That is another
reason for the lemma: "Avoid success at all costs"
The rule of least power
(http://www.w3.org/2001/tag/doc/leastPower.html)
http://www.w3.org/2001/tag/doc/leastPower.htmlOriginally
written by Tim Berners Lee;. For publishing (and, arguably, for code
reusability) "the best language is the least powerful".
This depressing conclusions can be overcomed if we consider that the rule of
least power favours turing incomplete DSLs, so every industrial development
can be decomposed in two groups wich demands two different skills: 1)
DSLs creation 2) DSL programming
2009/3/24 Manlio Perillo
Zachary Turner ha scritto:
[...]
but I do understand that one of the primary uses
cases and/or motivating factors for using Haskell is when you really just NEED that extra abstraction and power you get from being able to do these types of things. Someone once said that "simple problems should be simple and difficult problems should be possible". That doesn't mean the difficult problems become EASY. One of the best uses for haskell is solving difficult problems. It's obviously still going to be difficult to solve, and as such the writer (and hence by extension the reader) is going to have to be smart as well.
I agree with you, and in fact I'm still learning Haskell. The reason I'm still learning Haskell is because I like its syntax. And yes, I also like the ability to write efficient function by composing other function.
But there is a limit. In C you have the ability to write assembler code, but one usually think twice before doing so, since it will become unreadable to most of the people.
If you think that writing low level assembler code is the best solution, you should at least document it well, instead of assuming that the reader is as smart as you.
As I have written at the begin of the thread, there are people I know (*much* more smarter then me), that keep themselves away from Haskell because they start to read some code, and they feel something is wrong.
They *think* "ah, the author wrote code in this way just to show how smart he is; how can I learn a language if most of the available code is written in this way"?
Note the use of the verb "think". This is only a sensation, and it is wrong; but sensations are important.
[...]
Manlio _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe