by soup10 · 13y ago · 0 comments
Theirs very few haskell programmers that are interested in doing boring work. At some point though, boring work is necessary for a business, and at that time you want to be able to hire someone to do it, which will be very difficult if the codebase is in haskell.
I've found this to be totally the opposite: my time in Java is much less productive. There are many libraries in Haskell which aren't even possible to write in Java (automatic differentiation, parser combinators, lenses, etc.)
> very few haskell programmers that are interested in doing boring work
Nobody is interested in doing boring work, or it would be interesting work. Nothing to do with Haskell programmers.
Hiring (good) Haskellers is easy because there's a demand for jobs. It's as simple as that.
So you're saying Alan Turing was wrong? Publish your finding, win a Nobel Prize.
You didn't say it would be difficult, you said it wasn't possible.
Here's the breakdown:
1. Haskell is compiled into machine code.
2. Machine code doesn't care or reveal where it came from.
3. Points (1) and (2) demonstrate that any algorithm that can be written in Haskell, can also be written in machine code.
4. Therefore the claim that Haskell's libraries cannot be written in Java is false.
It's completely possible to have a Turing-complete method of computation that does not allow the equivalent of self-modification, for example. And then you won't be able to write a library for self-modifying code!
You can't retrofit Java with a macro system without writing a preprocessor, for example. So it is impossible to have a whole bunch of useful constructs in a library.
Essentially, as soon as you consider "self-reference"--that is, programs that depend on details of the machine itself--Turing-completeness stops mattering. And this is still important; programmers care about more than just what the program does, after all!
No, as a matter of fact, it's the point. A Turing-complete system can compute anything that any other Turing-complete system can.
> It's completely possible to have a Turing-complete method of computation that does not allow the equivalent of self-modification ...
Speaking of red herrings?
Nope! The Turing-completeness of Haskell and Java means they can both compute the same functions. However, there are certain things which are just not possible to express directly in some languages. Possible to compute, but not express directly.
Instead of Java, consider Brainfuck. It's a turing-complete language and certainly has no notion of what a function is. There's simply no way in Brainfuck to directly express that idea.
Another example, this time with Java and Haskell. In Haskell, I can write a function to add any two numbers (regardless of their type) like this:
add' :: Num a => a -> a -> a
add' x y = x + y
As far as I'm aware in Java, there's no way to write a function with a signature that says "Take two numeric arguments of any type". Certainly pre-generics, this is impossible.
Edits: markup
It was, before I got carried away: I was going to say that Turing-completeness does not translate to practice. And whoever chooses a language according to its Turing-completeness is missing the big picture.
This is not to suggest that someone would want to use Java for anything sufficiently sophisticated, unless one is a masochist, but then, that wasn't your claim.
> As far as I'm aware in Java, there's no way to write a function with a signature that says "Take two numeric arguments of any type". Certainly pre-generics, this is impossible.
A separate claim with no meaningful relation to the original one. This claim is that it would be inconvenient, not impossible.