You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enable parameter Optionality through Java's Optional class #78
Current iterations of Op reduction (see scijava/incubator#32) use an @Optional annotation. @ctrueden suggested that we also support optionality using java.util.Optional, i.e. an Op written as:
I think that for now, we are going to avoid doing this, for the following reasons:
The Optional class is designed more for providing nullable return values instead of optional-with-default parameters
Adding two ways to make parameters optional adds more complexity
Rewriting parameter types from Optional to the generic type of the optional requires javassist (whereas we could potentially use LambdaMetafactory if the parameter order is suitable), and could lead to matching errors
Activity
gselzer commentedon Jul 13, 2023
I think that for now, we are going to avoid doing this, for the following reasons:
Optionalclass is designed more for providing nullable return values instead of optional-with-default parametersMerge pull request #78 from scijava/scijava/scijava-ops-engine/more-m…