Skip to content

Reduce boilerplate in Lift Transformers #30

@gselzer

Description

@gselzer

In order to lift a particular Op to have a different typing, you need to write:

  • an OpTransformer specific to the input and output op Types.
  • a static method that does the transformation itself
    So, for example, we want to support lifting from I to Iterable<I> across all arity Functions, Computers, and Inplaces. This would require a separate OpTransformer Class and separate static method for Computer, BiComputer, Function, BiFunction, Inplace, and so on. To support all Op types would quickly bloat the code base.

What would be nice, if it is possible, would be to ditch the OpTransformer class entirely and to use annotations to create an OpTransformer from the method itself. In this way we would get rid of the vast majority of the code boilerplate while maintaining the static methods that are in essence the key of the transformation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions