Discussions

News: JGA 0.7 (Generic algorithms for Java) released

  1. JGA 0.7 (Generic algorithms for Java) released (12 messages)

    Generic Algorithms for Java (jga) is a functors library: the intent is to explore and exploit functors as a design and implementation tool to reduce boilerplate coding. A functor is an object that encapsulates a function or expression: it can take arguments and produce results, as can any method, expression, or function (in other languages that support functions). Unlike an expression, as an object it can be passed as an argument without being executed; it can be persisted to a database or file; it can be serialized and passed from client to server (and back); and it can be instantiated at runtime based on information unavailable at compile-time.

    Threaded Messages (12)

  2. aaa
  3. This is a fairly interesting development: having someone decide to repeat an old announcement.

    There's been some intervening work since last April, but not enough (IMO) to warrant a 0.8 version number. You can get a more recent version (0.7.3) at the following.

    https://sourceforge.net/project/showfiles.php?group_id=49942
  4. "A functor is an object that encapsulates a function or expression" - no, it is not. See wikipedia.

    Ignorantio, by the way, non est demonstrandum.
  5. Seems like it is[ Go to top ]

    C'mon, the article you reference refutes you in the first sentence!

    For functors in computer science, see the function object article.

    http://en.wikipedia.org/wiki/Function_object

    Whoops :)
  6. wrong term[ Go to top ]

    That's a demonstration of ignorance of the so-called "computers scientists". Check out ML and Haskell - they have it right.
  7. wrong term[ Go to top ]

    That's a demonstration of ignorance of the so-called "computers scientists". Check out ML and Haskell - they have it right.

    Ah, yes, the obligatory and prototypical "only my favorite esoteric [i.e. little used in real commercial development] language(s) really support <fill-in-the-blank> properly" comment.

    For those in the real world functor has a broader definition...
  8. wrong term[ Go to top ]

    That's a demonstration of ignorance of the so-called "computers scientists". Check out ML and Haskell - they have it right.

    Now you might, conceivably, have a problem with words that have more than one meaning. I suggest you seek professional help.

    By the way, the article goes on to mention the "right" meaning:
    In some functional programming languages, such as ML, a functor represents a mapping from modules to modules, and is a technique for reusing code. Functors used in this manner are analogous to the original mathematical meaning of functor in category theory.

    You take care now.
  9. Yes it may be[ Go to top ]

    "A functor is an object that encapsulates a function or expression" - no, it is not. See wikipedia.Ignorantio, by the way, non est demonstrandum.
    In the first line in the article you mention you will find
    "For functors in computer science, see the function object article."
    If you go to that article you will find
    "A function object, often called a functor, is a computer programming construct allowing an object to be invoked or called as if it were an ordinary function, usually with the same syntax. The exact meaning may vary among programming languages. A functor used in this manner in computing bears little relation to the term functor as used in the mathematical field of category theory."
    which does not appear inconsistent with the original definition you cite
    Which does not appear inconsistent with the definition with the definition
  10. Ignoratio[ Go to top ]

    Ignorantio, by the way, non est demonstrandum.

    "Ignoratio non est demostranda"
  11. whats it all aboot[ Go to top ]

    What are you lot on about?
  12. Functors in Java are just function pointers hamstrung into an object oriented paradigm. They can be useful but if you want to use currying, mapping etc then you probably you want to be able to express your code in terms of mathematical functions anyway and then optimise the evaluation of them, so Haskell or ML is the way to go. They are totally different problem domains. BTW OCaml is a language that is used quite a bit here in France in the rarified atmosphere of terrabyte data sets and numerical methods for differential equations.

    Michael
  13. Functors in Java are just function pointers hamstrung into an object oriented paradigm. They can be useful but if you want to use currying, mapping etc then you probably you want to be able to express your code in terms of mathematical functions anyway and then optimise the evaluation of them, so Haskell or ML is the way to go.

    Not necessarily, Michael. JGA's functors allow for composition such that you can create fairly efficient evaluation of arbitrary expressions. There is also a parser that allows the use of a runtime syntax that is much friendlier than composition by creation.

    However, the syntax that the parser supports is an extended subset of Java itself: if you want a mathematical implementation that is more than simple arithmetic over arbitrary Number types, than you're probably correct -- you want to use a more mathematically-correct language than Java. For quite a lot of everyday application use, though, JGA has (or can be extended to have) a lot of these cases covered.

    Dave Hall
    http://jroller.com/page/dhall
    http://jga.sf.net/