Skip to content

Disabling specific parts of an interface #45

Closed
@MilesCranmer

Description

@MilesCranmer

Hi @rafaqz,

Nice package! I'm working on adding it to DynamicExpressions.jl to test a few different abstract types: https://github.com/SymbolicML/DynamicExpressions.jl/blob/6c6485a32a63436cee23e0ff837d8653cd6ec223/src/Interfaces.jl#L89.

One question I had is if there is any way to turn off specific parts of an interface? For example, there is a function simplify_tree!. This is technically part of the interface, but there are specific types which break when using it. For those, I want the simplify_tree! call to return a helpful error instead of simply a MethodError – so the user is aware specifically why they shouldn't be trying to simplify that expression.

However I'm not sure the right way to do this. Any tips?

Thanks!
Miles

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions