Are programming languages ultimately procedural?

I'm studying a declarative programming language (Prolog) and in thinking about how certain things are programmed at a low level, a question came to me:

are programming languages ultimately procedural ?

• IMO that question makes no sense to ask. How the language is implemented does not affect what it is. – harold Mar 7 '18 at 13:10
• What about the opposite direction? You can implement a Python interpreter in Prolog, for instance -- would you say that Python is "ultimately declarative/logic" because of that? – chi Mar 7 '18 at 13:45
• The programming languages of computer processors (called "Assembly" or "machine code") are imperative. "Imperative" is what you probably meant by "procedural". Assembly does not have procedures actually. Hence if we want to run a program, we need to translate it into an imperative language. This translation belongs to an implementation of the language. A programming language is defined by its semantics, not by its implementation. There may be many implementations of the same language. – beroal Mar 10 '18 at 12:56

I imagine that by "procedural" you mean languages whose statements refer to changes of state in one ore more objects, but these references are implicit, not explicit (they follow a fixed pattern, for instance, the state change made by the execution of a statement is delivered to the next, resembling a procedure).

You may be referring to the fact that our computers, at a low level of abstraction, are usually state machines - so to speak - so all programming languages would have to be procedural languages disguised as something else.

This has happened for technical and economical reasons, it's not a theoretical imperative. It doesn't have to be that way. Inside your head there is a computational device that isn't like that, and we've been experimenting with all kinds of different models for low level implementation of general-purpose computers for decades. It is not unlikely that, at some point, one of these alternative models becomes commercially viable.

1. Existing hardware is "procedural". Therefore, whatever machines do, it is always "procedural" at the very low level. However, there is nothing mathematically fundamental about procedural computing. There are many forms of computing (procedural, functional, logic programming) and they can all simulate each other.

2. Furthermore, a programming language may have a definition of how it executes that does not "translate" or "compile" to anything. If such a language is functional, then we have a functional programming language that is not "ultimately procedural" because its execution rules are explained without refrence to anything procedural (Note: the execution rules themselves are given as an inductively generated relation, so they are a mathematical object and it makes no sense to ask "are the rules procedural?" It makes sense to ask how the rules should be implemented on existing hardware, goto 1.)

• Most existing hardware. There are still LISP machines kicking around in labs, for example. – Peter Taylor Mar 7 '18 at 17:03
• Ooo, it would be cool to have one of those. How much do they weigh? – Andrej Bauer Mar 7 '18 at 19:14
• My director of studies at university had one which was about the size of a large CRT, so probably only weighed a few kilograms. The illustration on the Wikipedia page shows one which looks more like 50kg. – Peter Taylor Mar 7 '18 at 22:18
• Speaking of non-procedural hardware, I vaguely recall having to solve some differential equations using an electronic analog computer in the late 80ies. – Kai Mar 8 '18 at 3:02
• I vaguely remember the late 80’s. – Andrej Bauer Mar 8 '18 at 16:50

No. not every programming language is procedural at the end. as procedural languages follow the pattern as the statements are typed whereas Non procedural languages keeps jumping to different statements and methods... take a look here too