Skip to content

Help Op Functionality #27

Closed
scijava/incubator
#34

Description

@gselzer

In the previous iteration of Ops there were 3 ways to get help:

  1. Provide a namespace and get help on all of the Ops within that namespace
  2. Provide a name and/or type and/or arity and get help on all satisfying Ops.
  3. Provide an Op and get help on that Op.

It is easy to write a help Op in the new iteration that takes a name and provides help on all satisfying Ops, which satisfies the functionality of 1 and partially of 2.

In the new iteration of Ops the third Op cannot be easily translated since there exists no basic Op interface for all of the Ops to implement. We could write an Op that is typed on Object, but it would take a lot of introspection to determine whether or not that Op has a name that we could look up. I would also call into practicality the usefulness of such an Op, since if you have matched an Op you presumably know enough about its structure that you should know how to use it. Is there a scenario in which you might have an Op and thus know its typing but might still want to call help?

So, what I am proposing is to only implement the help Op that takes a name, and to leave the other Ops behind. Are there any flaws in this thinking?

Activity

  1. added this to the 1.0.0 milestone on Jul 7, 2020
  2. gselzer commented on Aug 17, 2020

    @gselzer
    MemberAuthor

    Since most ops are named with the convention namespace.operation (e.g. math.add), it might be nice to change the op to work on a partial name (i.e. ops.op("help").input("add", ops).outType(String.class).apply() would return all "math.add" ops).

  3. gselzer commented on May 13, 2021

    @gselzer
    MemberAuthor

    Time commitment: 1 week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions