F
F
freeman02042016-10-12 17:22:46
PHP
freeman0204, 2016-10-12 17:22:46

Why are control structures in php and other languages ​​the way they are?

Loops, if else checks, arrays, and more. As I understand it, they were created out of direct necessity? The php interpreter has been written in "C". In "C" there are also such constructions. I mean, for example, the creators of the same "C" thought, if we need to repeat something many times, then we need to create some kind of loop construction, and if we need to set a condition, then if else, and if we need to issue a block of information, then some array? Is it really just one of the ideologies?
I would like to look at the syntax and constructions of the opposite PHP language and understand what it has and why everything is created that way.
It is desirable some kind of demanded language, but opposite in ideology and syntax and constructions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
D', 2016-10-12
@freeman0204

Loops/conditions, etc. are common constructs that are needed in any code. They simply could not be invented.
Look at functional languages ​​(Haskell, Erlang) as an example, they have a different philosophy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question