What is the relationship of scripting and object-oriented programming languages?

0 like 0 dislike
5 views
Actually a subject.


Maybe quite a stupid question, but nevertheless, I realized that I can't understand the relationship of a scripting language and object-oriented. Here, for example, is Groovy. It is a OOP language, and thus can be used as a script. Same — PHP(a scripting language initially, but supports the PLO). What does it mean, explain please?


As is the case now I understand: OOP language, it is thought objects and classes of these objects themselves. And scripted is when the user language are set immediately, and they are interpreted in the course. It is possible to create classes, methods, and immediately write the program instructions that will be converted. So how, then, can still fall within the scope of one language? In my head I had the(apparently wrong) contradiction. After all, if the PLO language all classes conceived, why then it is possible to write instructions, avoiding classes and methods?
by | 5 views

4 Answers

0 like 0 dislike
The question really is not very true is supplied, as compared with the warm soft.
\r
The OOP paradigm of programming in which the basic concepts are concepts of objects and classes (or, in a less known variant languages prototyping, prototype) (Wiki)
\r
A scripting language is a programming language designed for writing "script" sequences of operations that a user can perform on the computer. Simple scripting languages used called languages (Wiki)
\r
Now, you can write in a scripting programming language (which is not pure OOP) are simply instructions that are executed during the operation of the program immediately without processing to native code in advance. But nothing prevents you to write more complex scripts that can be logically divided into objects, classes, methods, interfaces, and the like.
\r
It would be better to compare compiled and interpreted programming languages, and functional and OOP languages.
by
0 like 0 dislike
Is a "pure" OO languages, in which it is impossible to work without objects, and have a "hybrid" that allows you to create programs in both procedural ("script") style, and OO.
by
0 like 0 dislike
There is such a language — Boo. There you can write code without describing classes, etc., but when the script is run, the interpreter automatically and transparently creates a byte code static class and its main method, which will be launched. The body of this method will be what you originally wrote.
\r
That is, for the programmer it is pure script (in your understanding) language, but strict OOP paradigm can be sustained.
by
0 like 0 dislike
you're a bit old-fashioned approach to scripting languages. Modern scripting languages required to work with objects, even old Javascript. It is a harsh necessity today, because without this it is impossible to solve today's challenges :)
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
7 answers
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
28,804 users