<Merry Christmas ⁄>
<myBlog show="last" ⁄>
<mySnippets order="rand" ⁄>
<myPhoto order="random" ⁄>
<mySnippets type="lang" ⁄>
<myQuote order="random" ⁄>
<myContacts ⁄><email ⁄>
<windows live messenger ⁄>
<myCurriculum type="pdf" ⁄>
<myVisitorsMap ⁄>
<myValidation ⁄>To answer the question of whether or not the code examples in "Why Functional Programming Matters" truly constitute a demonstration of the superiority of functional programming, one must first ask what it means for those programs to be implementable in other languages. Most languages of interest are Turing complete, and therefore compute the same functions. Clearly, then, we are looking for a more direct transformation into the target language.
One approach would be to consider the features of functional programming that are claimed by Hughes to set it apart, and then to see if each one of these can be emulated in a simple manner in the target language. If we fail to emulate a feature, we gain a fairly good understanding of where the language falls down; if we succeed, we can go ahead and use an empirical method as added evidence that the target language is as powerful as Lisp.
Another alternative would be to look at how programs in the source language might be implemented in the target language, in effect creating a translation from one language to another. This can be accomplished either by re-implementing the examples directly, or by examining correspondences between the languages in a more general fashion.
In this project, we demonstrate a Java emulation (section 2) and a C# tanslation (section 3) of the Hughes code snippets. We conclude that (modulo a few tradeoffs) the same level of modularity and code reuse can be achieved in object-oriented programming as in functional programming, making it more a choice of style than of necessity. We also present some benefits of object-oriented programming from the software engineering perspective. We discuss these tradeoffs (section 4).
este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:
http://www.cs.utexas.edu/~arvindn/hughes/
<myNews show="rand" cat="misc" ⁄>