My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 51: accept methods with bound parameters
1 person starred this issue and may be notified of changes. Back to list
 
Project Member Reported by kandpwel...@gmail.com, Apr 17, 2012
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
...above should have said "practically-immutable"
Labels: Priority-High
Apr 18, 2012
Project Member #2 kandpwel...@gmail.com
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
Project Member #3 kandpwel...@gmail.com
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
Project Member #4 kandpwel...@gmail.com
(No comment was entered for this change.)
Status: CodeComplete
Jul 24, 2012
Project Member #5 kandpwel...@gmail.com
(No comment was entered for this change.)
Status: Done

Powered by Google Project Hosting