CSC/ECE 517 Fall 2009/wiki2 6 ee

From Expertiza_Wiki
Revision as of 02:35, 10 October 2009 by Eeled (talk | contribs)
Jump to navigation Jump to search

Hybrid Object Oriented Programing Languages

Hybrid Object Oriented Programming Languages are object oriented languages that also include one or more additional programing paradigms. Commonly, hybrid object oriented languages include procedural and functional programing features, in addition to being object oriented. Having multiple paradigms embraced in one language adds flexibility to the developer, letting them leverage the most appropriate programing methods, without having to switch languages.

Programing Paradigms

Before delving into Hybrid Languages, here is a quick review of the paradigms we will be discussing.

Object Oriented Programming

In Object Oriented Programming, code is grouped together into collections called Objects. Objects keep track of data and contain methods relevant to the data of the object. An object is described by a class. In order for an object to be used, it must be instantiated from a class. Objects can utilize other objects to help represent their data in meaningful ways (ie a school object can have many student objects).[1]

Procedural Programming

With procedural programming, operations are listed one after another in the order they are to be executed. Procedural programming also incorporates the notion of functions, which are chucks of code that can be called repeatedly, usually to accomplish one specific task. Functions take in data to be processed as arguments and output the result of the computation. However, the output of a function can vary greatly, depending on the state of the program at any given moment.[2]

Functional Programming

Functional Programming has strong roots in mathematics and focuses on calculations. Functions are called only to compute data and do not change the state of the program. The output of functions in functional programming depend only on the arguments to the function, with no dependency on the state of the system. Also, all variables are final - that is, once assigned to, they cannot be changed. All these factors make functional programs very reliable and repeatable.[3]

Hybrid Object Oriented Programming Languages

The following Languages use Hybrid Object Oriented Programming Paradigms:

OCaml

OCaml was an addition to the Caml programming language, which was itself derived from ML. ML (Meta-Language) was originally developed as a highly functional programming language. It was used to assist with mathematical proofs. Caml was derived from ML to create a flexible programming language and it began to incorporate more procedural programming aspects. Finally, OCaml was implemented, which added object oriented features such as multiple inheritance and module hierarchy management.


Scala

F#

Fan