Search code examples
pythonprogramming-languages

What makes some programming languages more powerful than others?


I'm going to reveal my ignorance here, but in my defense, I'm an accounting major, and I've never taken a computer science class.

I'm about to start a new project, and I'm considering using Python instead of PHP, even though I am much more adept with PHP, because I have heard that Python is a more powerful language. That got me wondering, what makes one programming language more powerful than another? I figure javascript isn't very powerful because it (generally) runs inside a browser. But, why is Python more powerful than PHP? In each case, I'm giving instructions to the computer, so why are some languages better at interpreting and executing these instructions? How do I know how much "power" I actually need for a specific project?


Solution

  • When Paul Graham talked about Lisp being the most powerful language available, he meant most expressive. You can express any program in any turing complete language. That's the whole point. What makes one language better than another (for a particular task) is its ability to define a given program more concisely or clearly. For most programming tasks, that's what matters.

    Occasionally (and I mean very occasionally) performance starts to play a role, and features like the ability to embed assembly language easily in your program matters. But for the most part, it's about the ability to express your ideas clearly and concisely.