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
Add parameter type information to ops.descriptions() output #135
What types are the input (I1 and I2) and output (O)? After talking to Gabe, I learned they are RealTypes. The output from ops.descriptions() does not indicate that these are RealTypes. How can we display the parameter types here?
If N extends Number we could just put Number, especially if multiple arguments don't use the same N.
If I1 extends RealType<I1> we could just put RealType, although that's imprecise.
If I1 extends RealType<I1> & NativeType<I1> we could just put RealType (i.e. use the first bound)—or we could put RealType+NativeType with our own homebrewn syntax shorthand.
If Img<T> where T extends RealType<T>, we could put Img i.e. erase the generics.
Should we always erase generics? Or should there be two modes: simple and advanced?
If advanced is a mode we want to support, I would favor keeping the type variables in a Java style, like:
Tentatively: the descriptions method can be augmented to support two modes via a boolean simple which uses shorthand types with erased generics when true (the default), but fully elucidates the generic types and type variables when false.
Activity
ctrueden commentedon Sep 26, 2023
N extends Numberwe could just putNumber, especially if multiple arguments don't use the sameN.I1 extends RealType<I1>we could just putRealType, although that's imprecise.I1 extends RealType<I1> & NativeType<I1>we could just putRealType(i.e. use the first bound)—or we could putRealType+NativeTypewith our own homebrewn syntax shorthand.Img<T>whereT extends RealType<T>, we could putImgi.e. erase the generics.ctrueden commentedon Sep 26, 2023
Tentatively: the
descriptionsmethod can be augmented to support two modes via aboolean simplewhich uses shorthand types with erased generics when true (the default), but fully elucidates the generic types and type variables when false.Merge pull request #135 from scijava/scijava-ops-engine/simple-to-con…