| > As far as I'm aware, it's not possible to write this code in Java- you can't get the differentiated version of a Java function this way. No. The algorithms for symbolic differentiation are well-known, they aren't unique to Haskell. They happen not to be present in any Java library AFAIK, but that's because no one is sufficiently masochistic to code them there. (long pause ...) Whoops -- I was wrong: https://code.google.com/p/javacalculus/ > You can write a library which differentiates string-representations-of-functions, but you can't write one that differentiates first-class-Java-functions ... I think we're getting into a moot area now. If the end result is symbolic differentiation, the specifics become irrelevant. And, since Java bytecode can be converted into a textual representation, it can also be symbolically differentiated by conventional means. Also, we've left the original topic, which was that Haskell has properties not present in other languages and/or outcomes not possible in other languages. In a larger sense, wouldn't it be more praiseworthy to say that Haskell does exactly what other languages do, but much better? That time spent programming in Haskell is more productive when measured by bug-free lines of code and concise expressions? Or that, when parallel processing finally arrives in full force, functional programming will not longer be optional? |
Ah, I see the problem- automatic differentiation is not the same as symbolic differentiation- see wikipedia: http://en.wikipedia.org/wiki/Automatic_differentiation This certainly isn't a moot point :)
> Also, we've left the original topic (...)
No- again, I've been saying the same thing all along. In fact I'm only using Haskell as an example. There are things which cannot be expressed in Haskell, too- for example dependent typed programs as you might find in Agda or Idris.
> In a larger sense, wouldn't it be more praiseworthy to say that Haskell does exactly what other languages do, but much better?
This is a separate conversation entirely. My aim is not to "praise Haskell". I have used Haskell and Java only as examples.