0

Are object oriented languages more powerful than declarative programming languages? By powerful I mean are they able to solve a class of problems that any program written in a declarative programming language can't?

Personally I don't think so. There exists a set of problems for which it is easier to write a program using an object-oriented language, but I think those problems could be solved using declarative languages too (albeit it might be harder to so)

Would like to hear more views on this one.

Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202

1 Answers1

2

Go read up on Turing completeness. It basically means any turing complete language can solve any problem a turing machine can.

And most languages are turing complete. (I doubt you'd ever use a non turing complete language).

Alternatively you can think of it as you can solve any problem with Ook! even though it's a very silly language.

Raynos
  • 166,823
  • 56
  • 351
  • 396
  • 1
    Nitpick: True Turing completeness is unattainable by any language that's running on a real machine. Turing equivalence is about the best one can achieve. – cHao Nov 09 '11 at 19:28
  • @cHao whats the difference? Is it the infinite tape restriction? – Raynos Nov 09 '11 at 19:35
  • 2
    Turing completeness, by definition, is the ability to simulate a Turing machine. And a Turing machine has infinite tape (memory). No real-world machine (and thus, no language designed to make programs to run on said machine) can satisfy that criterion. – cHao Nov 09 '11 at 19:37