Saturday, October 10, 2009

Object-Oriented vs. Functional Programming (Beautiful Architecture - Chapter 13)

For those not familiar with the term, you might ask what is functional programming? Functional programming is a style of programming that emphasizes the evaluation of expressions rather than the execution of commands.

UIUC students (undergraduate and graduate) will learn about functional programming and OCaml if they take CS 421, Programming Languages & Compilers, as part of their degree. Students will be exposed to and receive hands-on experience as to how a functional programming language eases the pain of writing the various components of a common code compiler. It does take some time getting used to the syntax and break out of the shell of imperative programming.

Functional programming has its place, but that place is not in everyday software development. Maybe I am biased since the industry of my employment relies on modular, reliable, extensible, and maintainable software. That does not mean C++ or Java is the answer to all software development projects. Object-oriented concepts applied through common development languages allows the majority of software engineers to understand and maintain the code.

We all know the keys to good software architecture. Make sure code is extensible so modifications affect as few modules as possible. A one-module solution does not support reusability. Modularity is the key to successful software design.

I, personally, found it more difficult to troubleshoot or debug functional program code. It was uncomfortable to comprehend the logic and try to apply patterns or refactor your code. The same ideas or concepts that have been ingrained in our brains are not easily interchangeable between object-oriented and functional programming.

No comments:

Post a Comment