Definition of object oriented programming
Shouldn't it be called object oriented scripting when using scripting languages such as php, actionscript and so on? The definition of oop and oos would be the same but naming the use after what l开发者_如何学Canguage you are using?
No, it shouldn't. The act of writing software for a computer (or anything else, I guess) is "programming". If you use a technology based on objects, it is object-oriented programming. Making a distinction serves no purpose.
Considering the fact that most so-called "scripting" languages these days that have OOP have significantly more reason to be called "programming" languages than "scripting" ones, no, it shouldn't.
The only languages I can legitimately call "scripting" (as in, can't be easily used for "real programming") is AWK or unix shell scripting (sh or csh or bash); or DOS batch file languages.
The reason those languages you thought of (Per/Python) are sometimes called "scripting" is not because you can't program in them, but because in those cases when you need to write a small script, they ARE better suited than other languages. Mostly due to their dynamic typing and system integration.
However, pretty much all of those languages (not sure about PHP) are just as "programming" as the languages considered "real programming" languages by people as misinformed as you are.
Please note that this answer specifically applies to Python and Perl - I don't know enough about ActionScript or PHP to know where they stand (PHP is likely to fall under "programming").
Please note that it's more about the quality of the developer than particulars of the language.
I've seen (and written) beautiful and complex OO systems in Perl.
I've also seen a horrifying collection of excrement that was unfortunately considered to be a C++ "program".
精彩评论