Skip to content

Validate op arguments early to better support eager execution #234

@anssiko

Description

@anssiko

TypeError is thrown if an invalid argument type is passed to an op. We'll get this behavior for free by using Web IDL. However, more complex checks for passed arguments must be specified in prose.

An example could be the padding argument of pad() that must be a sequence of length 2 to be a valid argument. Currently, too long or short sequence I believe is detected when compute() is invoked that throws either a DataError or an OperationError.

To better support eager execution and imperative programming, it would be helpful to validate arguments as early as possible and throw an appropriate error upon op invocation. This also helps with debugging and experimentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions