User:Mkotyad: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Created page with " == Object oriented languages: An Overview == C++: C++ is a statically typed, multi-paradigm programming language. It supports some features of object-oriented languages like e...")
 
(Blanked the page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:


== Object oriented languages: An Overview ==
C++:
C++ is a statically typed, multi-paradigm programming language. It supports some features of object-oriented languages like encapsulation, polymorphism and inheritance. It provides access control by specifiers public, private and protected and also allows “friend” classes. C++  allows multiple inheritance which is eliminated in most other programming languages as it allows a class to inherit from more than one base class which results in an ambiguity effect.
Java:
Java is classified as a statically typed, hybrid object oriented language. Although it provides information hiding, inheritance and polymorphism, it has a few basic types incorporated that are not objects and some of the built-in operators are provided by basic arithmetic and not as messages to objects. [link]. For these reasons, it is not considered to be a “pure” object-oriented language.
Java provides access control and supports private, public and protected access. It also allows to create packages to create and maintain namespaces. Java is designed not to provide multiple inheritance to avoid problems faced in C++. However, it presents a single-rooted hierarchy where “Object” is the ancestor of all classes (seen in Ruby too) and provides interfaces to extend/inherit functionality.
Python:
Python is a dynamically typed, interpreted, object oriented language. It is argued that Python is not completely object oriented as it does not provide access control.
Ruby:
Ruby is dynamically typed and highly object-oriented, much more than Java and Python. In Ruby, it is said that “everything is an object”.  Every value happens to be an object in Ruby. You may call methods on a string, an integer just like you call on any object in Java.
Ruby : Purely Object Oriented
Ruby is considered to be a purely Object oriented Language, as everything in it is considered to be an object. Unlike Java, even primitives such as characters, punctuation, numbers and strings are treated as objects in Ruby. Ruby was designed to facilitate the enforcement of Object Oriented Methods. Ruby is a Dynamically Typed Language.

Latest revision as of 03:53, 20 October 2011