News for hackers. Stuff that matters.
Re:Lisp in Prolog in zero lines by jrockway on Wednesday August 19, 2009 @09:47AM (#772698)
What?

OOP and FP are very similar. You can bet that if the average Enterprise Java Programmer used Haskell instead of Java, the code would be just as confusing and unmaintainable. The problem is not programming paradigms, but bad programmers.

(Programming is difficult to teach, learn, and practice, but is also in high demand. This leads to bad programs. OOP has nothing to do with it.)

I certainly agree that immutable data is better than mutable data, but that again has nothing to do with FP or OOP. I can mutate data in Lisp, and I can have fully-immutable instances in Java (not my choice, btw, but definitely possible). It comes down to recognizing the value of immutability, which is the programmer's job.

Re:Lisp in Prolog in zero lines by jerf on Wednesday August 19, 2009 @12:53PM (#773070)
One of my private fantasies is to ship a task to an outsourced (in the worst sense) organization and specify that they must use Haskell. I can't even imagine what monstrosity would come back, but I bet it would be hilarious.

Personally, I rate the perversity of bad coders as being well above Haskell's ability to prevent perversities, but the fight would be truly epic and produce months worth of tdWTF fodder. I don't know which would be worse: Them discovering unsafePerformIO, or them not.

Re:Lisp in Prolog in zero lines by rogersm on Wednesday August 19, 2009 @01:49PM (#773247)
System.system can be done in all languages.
Re:Lisp in Prolog in zero lines by swolchok on Wednesday August 19, 2009 @07:01PM (#774020)
False. Counterexample: Brainfuck. There's nothing about Turing completeness that includes the ability to make system calls.
Re:Lisp in Prolog in zero lines by silentbicycle on Wednesday August 19, 2009 @11:14AM (#772864)
The worst thing is debugging OO code written by somebody newly infatuated with Haskell. (I learned my lesson.)
Re:Lisp in Prolog in zero lines by jrockway on Wednesday August 19, 2009 @11:32AM (#772898)
In what way?

(I am glad to say that I have not yet written "class Foo does Monad, Functor {}" ;)

Re:Lisp in Prolog in zero lines by silentbicycle on Wednesday August 19, 2009 @11:56AM (#772948)
It's likely to go against the flow of the language. While I don't agree with all the design trade-offs in Python, there's a lot to be said for having a clear idea of what style(s) fit the language (what's "Pythonic") and sticking with it. Python code stubbornly written as if it were Haskell is often inefficient and hard to read. Writing idiomatic code that works with the strengths of the language at hand is a better idea. When/if somebody else works with your code, it's unlikely they will have exactly the same background as you, though they will probably know the language you wrote the project in.

(I'm assuming it's not in a language like OCaml or Oz that can comfortably fit both styles.)