News for hackers. Stuff that matters.
Re:Functional Java by apgwoz on Tuesday February 24, 2009 @01:45PM (#493404)
I'm guessing from the other comments it's not just "use clojure"? Site isn't responding at the moment.
Re:Functional Java by michaelneale on Tuesday February 24, 2009 @07:24PM (#493842)
Well knowing the author a bit - its about taking advantage of the proposed BGGA closure proposal and introducing FP features to java programmers.
Re:Functional Java by tomjadams on Wednesday February 25, 2009 @05:41PM (#495061)
I've been involved in the Functional Java project for a while, it was created as we worked for a consultancy that did most of its work in Java and we wanted to use functional idioms in Java. It was also intended as a bit of an experiment to see just how much could be done in Java,
Re:Functional Java by yters on Tuesday February 24, 2009 @04:31PM (#493630)
Here's their functioning google code site: http://code.google.com/p/functionaljava/
Re:Functional Java by johnbender on Tuesday February 24, 2009 @12:56PM (#493349)
I was thinking "functioning" java when I saw the title :)
Re:Functional Java by drcode on Tuesday February 24, 2009 @12:56PM (#493348)
cool, but painful.
Re:Functional Java by earl on Tuesday February 24, 2009 @04:50PM (#493655)
Well, even if it can be done, why? There are perfectly fine languages that don't fight you every step of the way.

This, btw, is the content of the front page since the site is hosed.

[quote]

Functional Java is an open source library that aims to prepare the Java programming language for the inclusion of closures. It also serves as a platform for learning functional programming concepts by introducing these concepts using a familiar language. The library is intended for use in production applications and is thoroughly tested using the technique of automated specification-based testing with ScalaCheck.

Functional Java currently includes the following algebraic structures:

    * Immutable, in-memory singly linked list (fj.data.List)
    * Immutable lazy singly linked list (fj.data.Stream)
    * Array wrapper (fj.data.Array)
    * Optional value type-safe null (fj.data.Option)
    * Disjoint union a superset of exception handling (fj.data.Either)
    * Monoid (fj.pre.Monoid)
    * Functions with arity 1 to 8 usable with Java 7 closure syntax
    * Products of 1 to 8
Functional Java now includes the Reductio automated specification-based testing framework.

Functional Java includes usage examples and notably, code examples that make use of the Java 7 BGGA proposal syntax. Here is one such example (import statements omitted) that maps a transformation across an array by adding 42 to each element.

      final Array<Integer> a = array(1, 2, 3);
      final Array<Integer> b = a.map({int i => i + 42});
      arrayShow(intShow).println(b); // {43,44,45}
[/quote]