terça-feira, 8 de julho de 2014

Becoming Functional - Part 1

Becoming Functional by Joshua Backfield

Recently there is a growing interest on functional programming languages that diverge from the object-oriented mainstream. Although programmers are evaluating new alternatives, sometimes it is difficult to use a new paradigm to implement a full production application from scratch as many teams work evolving existing systems and even a new application commonly will have to integrate with a pre-existing language ecosystem such as .NET or the JVM. Other times vendor support, team politics and other issues may also difficult or impede a language change.

So comes the idea proposed by Joshua Backfield´s book "Becoming Functional": a step-by-step transition to functional code from a object oriented Java source: first by coding using language features such as first-class functions in Java and then using other JVM based languages, such as Groovy and Scala to implement other functional features which are absent from Java, such as non-strict evaluation.
The books idea seems original: most functional language books are language guides or try to model an application domain such as Natural Language Processing to a programming language.

Also the book has other merits: it a small scale model of a real world situation where you are maintaining an existing code base and will implement new features and fix exiting ones; although you are using a newer language, at the same time you are keeping the runtime environment, in this particular case, the JVM; therefore you have full interoperability. As you are implementing some features and not a complete system it allows you to be not fully proficient in this new language.

It will be very interesting to see versions of this book using the Javascript and the .Net runtime environments. Also it would be very interesting if the book had provided a session with a more functional language such as Clojure.


I review for the O'Reilly Reader Review Program

Nenhum comentário:

Postar um comentário