Friday, May 13, 2011

Comparing Object Oriented Language and Functional Language

     The two programming languages that are best to compare in computer programming would have to be the Object Oriented language and the Function Oriented language. They are two of the most similar languages. Both object oriented language and functional programming language structure themselves around the input of data into the system. The way they structure the data however, differs a little. 
     Object oriented language separates data into different structures with their own methods and interactions to design applications and computer programs. Object oriented language usually will all come together in the end and share in one common task of function. These different methods and interactions all have functions and subroutines and each can perform a different task. Functional programming language tends to avoid state and mutable data. It focuses more on the changes in state. The output value really only depends on the information that is put into the input of the function. 
    A function that has an equal value of information will produce the same result. When Object oriented language runs into an error while it is executing a program it will most often stop at the line that caused the error so it is easy to figure out what is wrong. Functional programming will run through a function all the way through before stating there is an error and it is not as specific as to where the error is as much as object oriented language does for the programmer.