| Issue 59: | Add command object creation to supporting frameworks | |
| 1 person starred this issue and may be notified of changes. | Back to list |
I just realized I had discussion about this in the mailing list (https://groups.google.com/group/funcito/browse_thread/thread/71222cf08e89cbfb?hl=en) but no issue open here. Anyway, both Jedi and Functional Java implement function-like objects with side-effect and no return value. In Java it is Command, and in Functional Java it is Effect. If apache-commons-functor ever releases, it also has a Procedure/UnaryProcedure, and BinaryProcedure. Play framework has the F.Callback interface
Aug 18, 2012
Project Member
#1
kandpwel...@gmail.com
Aug 27, 2012
Was going to attempt this as it seemed trivial, but ran into major roadbloack: http://stackoverflow.com/q/12136381/433348 (short version: Command or Effect would likely wrap void methods that produce *only* side effects, but can't use a call to a void method as argument to a new Funcito method).
Mar 7, 2013
(No comment was entered for this change.)
Status:
Deferred
Jun 4, 2013
Also, in Collections-generic (generic version of apache commons collections), the "command"-like class would be Closure: https://github.com/megamattron/collections-generic/blob/master/src/java/org/apache/commons/collections15/Closure.java
Jun 6, 2013
Looks like I will implement this despite previously mentioned "roadblock". API will use "typical" Funcito semantics for method calls that are not-null (even though return value will be ignored). And for void method-calls (sadly) users will have to use a 2-line semantic to initialize a Command/Effect/Closure.
Labels:
Milestone-R1.3
Jun 6, 2013
(No comment was entered for this change.)
Status:
Accepted
Jul 14, 2013
comment 5 was supposed to say "non-void" rather than "not null"
Jul 16, 2013
(No comment was entered for this change.)
Status:
CodeComplete
Oct 31, 2013
(No comment was entered for this change.)
Status:
Fixed
|