-
JGA 0.7 (Generic algorithms for Java) released (12 messages)
- Posted by: Adam John
- Posted on: March 19 2006 13:47 EST
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)
- JGA 0.7 (Generic algorithms for Java) released by Steve Garcia on March 20 2006 12:00 EST
- JGA 0.7 is almost a year old -- try 0.7.3 by David Hall on March 20 2006 13:56 EST
- Check out the definition of functor. by Vlad Patryshev on March 20 2006 14:27 EST
- Seems like it is by Johnson Johnson on March 20 2006 14:42 EST
-
wrong term by Vlad Patryshev on March 20 2006 04:44 EST
- wrong term by Jess Holle on March 20 2006 08:23 EST
- wrong term by Radu-Adrian Popescu on March 21 2006 02:52 EST
-
wrong term by Vlad Patryshev on March 20 2006 04:44 EST
- Yes it may be by Solomon Obi on March 20 2006 14:42 EST
- Ignoratio by David López on March 21 2006 09:20 EST
- Seems like it is by Johnson Johnson on March 20 2006 14:42 EST
- whats it all aboot by stu pot on March 21 2006 12:03 EST
- Imperative vs Functional programming by Michael Bienstein on March 21 2006 17:12 EST
- Imperative vs Functional programming by David Hall on March 21 2006 17:59 EST
-
JGA 0.7 (Generic algorithms for Java) released[ Go to top ]
- Posted by: Steve Garcia
- Posted on: March 20 2006 12:00 EST
- in response to Adam John
aaa -
JGA 0.7 is almost a year old -- try 0.7.3[ Go to top ]
- Posted by: David Hall
- Posted on: March 20 2006 13:56 EST
- in response to Adam John
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 -
Check out the definition of functor.[ Go to top ]
- Posted by: Vlad Patryshev
- Posted on: March 20 2006 14:27 EST
- in response to Adam John
"A functor is an object that encapsulates a function or expression" - no, it is not. See wikipedia.
Ignorantio, by the way, non est demonstrandum. -
Seems like it is[ Go to top ]
- Posted by: Johnson Johnson
- Posted on: March 20 2006 14:42 EST
- in response to Vlad Patryshev
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 :) -
wrong term[ Go to top ]
- Posted by: Vlad Patryshev
- Posted on: March 20 2006 16:44 EST
- in response to Johnson Johnson
That's a demonstration of ignorance of the so-called "computers scientists". Check out ML and Haskell - they have it right. -
wrong term[ Go to top ]
- Posted by: Jess Holle
- Posted on: March 20 2006 20:23 EST
- in response to Vlad Patryshev
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... -
wrong term[ Go to top ]
- Posted by: Radu-Adrian Popescu
- Posted on: March 21 2006 02:52 EST
- in response to Vlad Patryshev
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. -
Yes it may be[ Go to top ]
- Posted by: Solomon Obi
- Posted on: March 20 2006 14:42 EST
- in response to Vlad Patryshev
"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 -
Ignoratio[ Go to top ]
- Posted by: David López
- Posted on: March 21 2006 09:20 EST
- in response to Vlad Patryshev
Ignorantio, by the way, non est demonstrandum.
"Ignoratio non est demostranda" -
whats it all aboot[ Go to top ]
- Posted by: stu pot
- Posted on: March 21 2006 12:03 EST
- in response to Adam John
What are you lot on about? -
Imperative vs Functional programming[ Go to top ]
- Posted by: Michael Bienstein
- Posted on: March 21 2006 17:12 EST
- in response to Adam John
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 -
Imperative vs Functional programming[ Go to top ]
- Posted by: David Hall
- Posted on: March 21 2006 17:59 EST
- in response to Michael Bienstein
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/