| Issue 51: | accept methods with bound parameters | |
| 1 person starred this issue and may be notified of changes. | Back to list |
I am beginning to think that it may be almost trivial to support building functional objects from cals to methods bound to pre-defined parameters, instead of being limited to no-param methods. This would leave an additional burden on the developer to make sure they always bind to immutable objects (primitives, Strings, etc.), or at least objects that are not used as mutable in the particular context ("practically-mutable").
Apr 17, 2012
Project Member
#1
kandpwel...@gmail.com
Labels:
Priority-High
Apr 18, 2012
Just tried to spike a simple solution and it worked marvelously, so this is on the docket for sure.
Status:
Accepted
Labels: Milestone-R1.1
Apr 18, 2012
Maybe I should clarify from the OP: you wouldn't *have to* supply immutable or "practically immutable" parameters. But then your function-like objects are not necessarily giving you functions in the mathematical sense: invoking a function for the same input object (the "A" in Function<A,B>) bound to a mutable method parameter can actually return different values at different times as that bound mutable object mutates due to outside forces. This is actually OK and possibly desirable in a lot of cases. At that point you are no longer doing "functional programming", per se, but rather conveniently wrapping method calls with (or without) bound parameters as an invokable object. This would definitely need to be explained in Javadoc and project docs.
May 10, 2012
(No comment was entered for this change.)
Status:
CodeComplete
Jul 24, 2012
(No comment was entered for this change.)
Status:
Done
|