Title :
Comparing programming paradigms: an evaluation of functional and object-oriented programs
Author :
Harrison, R. ; Smaraweera, L.G. ; Dobie, M.R. ; Lewis, P.H.
Author_Institution :
Dept. of Electron. & Comput. Sci., Southampton Univ., UK
fDate :
7/1/1996 12:00:00 AM
Abstract :
A quantitative evaluation of the functional and object-oriented paradigms is presented. The aim of this project is to investigate whether the quality of code produced using a functional language is significantly different from that produced using an object-oriented language. 12 sets of algorithms are developed, together with a number of utility functions, in both Standard ML (SML) and C++. Strict constraints are imposed during the development cycle to improve the reliability of the results. The statistical tests do not reveal any significant differences for direct measures of the development metrics used which are associated with quality, such as the number of known errors, the number of modification requests, a subjective complexity assessment, etc. However, significant differences are found for an indirect measure, the number of known errors per thousand non-comment source lines, and for various code metrics, including the number of distinct functions called, the number of distinct library functions called, and the ratio of these, which is a measure of code reuse. A difference is also found for the time taken to test the programs, due to different compilation techniques and a difference in the number of test cases executed
Keywords :
functional programming; object-oriented programming; program testing; software metrics; software quality; software reusability; statistical analysis; C++ language; Standard ML; code metrics; code quality; code reuse; compilation techniques; development metrics; direct measures; function calling; functional language; functional programs; indirect measure; known errors; library functions; modification requests; noncomment source lines; object-oriented language; object-oriented programs; program testing time; programming paradigms; quantitative evaluation; reliability; software development cycle; statistical tests; strict constraints; subjective complexity assessment; test case number; utility functions;
Journal_Title :
Software Engineering Journal