Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Crossing the gap from imperative to functional programming through refactoring
Gyori A., Franklin L., Dig D., Lahoda J.  ESEC/FSE 2013 (Proceedings of the 2013 9th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, Saint Petersburg, Russia, Aug 18-26, 2013)543-553.2013.Type:Proceedings
Date Reviewed: Oct 3 2013

I have been writing functional programs for 30 years, first in KRC, then in Miranda, and more recently in Haskell and Erlang. In the past few years, however, something rather remarkable has been happening: the essentials of functional programming have been popping up in more “serious” mainstream languages, including JavaScript, C#, C++, and Java. What is this functional core that’s coming into these languages? It is the ability to compute functions as a part of the work of a program, and to pass these around as parameters or return values of other functions: closures as “first-class citizens,” in Strachey’s words.

But why is this happening? As the authors of this fine paper explain, it is to exploit the parallelism that is now a feature of many computing platforms, from smartphones and tablets, through laptops and desktops, to servers and supercomputers. To give one example, mapping a function across a collection data structure is one of the key parallel patterns, providing the data analog of a linear (control) pipeline.

Given the opportunity, how can we program using these new features? One possibility is to start from scratch with these new constructs, but a more attractive option is to refactor existing code to exploit these features. That is precisely the topic of this paper. The authors show how to identify refactoring opportunities, and what transformations to perform. Moreover, they anatomize some of the attendant difficulties: How should side effects be handled? How do we deal with different scoping regimes between anonymous inner classes and closures? The authors’ work is validated through a set of substantial case studies, and made available through the standard NetBeans distribution.

I would recommend this paper to anyone interested in exploiting the parallelism inherent in many standard programs, as well as those who would like to see a justification for machine-supported refactoring. Finally, it is a remarkable validation of efforts to get students involved in research: two of the four authors took part in undergraduate summer internships.

Reviewer:  Simon Thompson Review #: CR141608 (1312-1110)
Bookmark and Share
  Featured Reviewer  
 
Distribution, Maintenance, and Enhancement (D.2.7 )
 
 
Coding Tools and Techniques (D.2.3 )
 
Would you recommend this review?
yes
no
Other reviews under "Distribution, Maintenance, and Enhancement": Date
A program design language based software maintenance tool
Ince D. (ed) Software--Practice & Experience 15(6): 583-594, 1985. Type: Article
Mar 1 1986
The complete computer maintenance handbook
Bellin D. (ed), Harper&Row Publishers, Inc., New York, NY, 1986. Type: Book (9789780060406189)
Jul 1 1986
Building custom software tools and libraries
Stitt M., John Wiley & Sons, Inc., New York, NY, 1993. Type: Book (9780471579144)
Nov 1 1993
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy