DocumentCode
323475
Title
Combining functional and object-oriented programming methodologies in a large commercial application
Author
Poole, Ian ; Ewington, Craig ; Jones, Arthur ; Wille, Steve
Author_Institution
Vysis Inc., Downers Grove, IL, USA
fYear
1998
fDate
14-16 May 1998
Firstpage
111
Lastpage
117
Abstract
Functional programming concepts of referential transparency and lazy evaluation combine effectively with object oriented encapsulation. We present a design pattern for C++ classes that are logically immutable and fully determined by the parameters of their constructor. Hidden state is used internally to cache the results of computation performed in the scope of accessors, giving them lazy semantics. Modifying replicators model change by constructing a new instance without changing the original. Previously computed results are lazily copied via a back reference if the parameters upon which the computation depends have not changed. Since these classes are logically immutable they can be freely shared by reference in complex networks, mitigating the amount of actual copying performed. These techniques realize several advantages-well known to the functional programming community-including suitability for modular reasoning and parallel evaluation. `Undo´ facilities and safe recovery from exceptions can be provided with little extra effort. Examples from a large multi platform biomedical imaging application illustrate the techniques
Keywords
C language; data encapsulation; exception handling; functional programming; medical image processing; object-oriented languages; object-oriented programming; C++ classes; back reference; complex networks; design pattern; functional programming concepts; functional programming methodologies; large commercial application; lazy evaluation; lazy semantics; modular reasoning; multi platform biomedical imaging application; object oriented encapsulation; object oriented programming methodologies; parallel evaluation; safe recovery; undo facilities; Application software; Cells (biology); Complex networks; Cyclotrons; Encapsulation; Functional programming; Laboratories; Object oriented modeling; Object oriented programming; Programming profession;
fLanguage
English
Publisher
ieee
Conference_Titel
Computer Languages, 1998. Proceedings. 1998 International Conference on
Conference_Location
Chicago, IL
ISSN
1074-8970
Print_ISBN
0-8186-8454-2
Type
conf
DOI
10.1109/ICCL.1998.674162
Filename
674162
Link To Document