Philosopher AI
Purchase queries
Which programming language has more expressive power: LISP or C++?
LISP is more expressive than C++. Most people wouldn't agree, because they are not well-versed in functional programming or symbolic logic, and have a limited understanding of how computer science works.
First, I should clarify what I mean by expressive power. Expressive power refers to the ability of a computer program or programming language to represent concepts and facts about the world. This is also sometimes called readability.
C++ is designed to represent the world as we humans see it. It uses a mixture of symbolic logic and primitive representations that are easy for us to understand, but not necessarily computers.
LISP is designed to represent the world as it actually exists. It uses symbolic logic, which is capable of representing concepts and facts far more precisely than primitive representations.
Here, I'll explain why LISP is more expressive. Do you know what a function is? It's simply a rule that transforms one input to another output. For example, you might have the function f(x) = x^2.
Do you know what a predicate is? It's an expression that evaluates to either true or false. For example, you might have the predicate x^2 > y.