Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Oriented Scripting

 
anil pamidi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can any one let me know what exactly does Object Oriented Scripting mean .It is a new concept to me.
Thanks
Anil
 
Michael Swierczek
Ranch Hand
Posts: 125
1
Clojure Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Object Oriented Scripting is just Object Oriented Programming (classes, encapsulation, polymorphism, inheritance, and so forth) with a scripting language like Perl, PHP, Python, or Ruby. All four of those languages have interpreters that run the source code directly without turning it into compiled bytecode or compiled object code first, and all four have some mechanism for object oriented programming.

Java and C# are Object Oriented Programming Languages that get turned into bytecode, and are run through virtual machines (the Java Virtual Machine or the Microsoft dot NET framework, respectively).

C++ and Objective C are Object Oriented Programming Languages that get compiled directly into machine code.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, Python does compile into byte code as it runs your code ( turns .py file into a .pyc file) so I suppose the byte code thing isn't a proper differentiator, assuming that we agree about Python being an object-oriented scripting language.

Personally, I (implicitly) define a "scripting language" as one that lets you write code without defining classes, main methods, etc. imposed structures.

For example, this is a Ruby script that doesn't have any sign of classes, functions, methods, etc. and it still executes:

You can't do this with Java, for example, which is why Java doesn't pass as a scripting language - you always need at least one class and a main method.

Continuing on this definition, an object-oriented scripting language is one that also allows you to use concepts such as objects (and, optionally, classes).
 
anil pamidi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helloo,
Are we not missing the platform independent feature, if the code is not getting converted into bytecode?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by anil pamidi:
Are we not missing the platform independent feature, if the code is not getting converted into bytecode?

No. Why would that be required for platform independence?
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This topic went to some length discussing the differences between scripting languages and programming languages.
 
anil pamidi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf for the link.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic