Skip to content

AbstractMesh is just AbstractVector #54

Closed
@rdeits

Description

@rdeits

I'm working on porting MeshCat.jl from GeometryTypes to GeometryBasics, and I just ran into an interesting method ambiguity that turned out to be due to the fact that AbstractMesh is exactly AbstractVector:

julia> AbstractMesh
AbstractArray{Element,1} where Element

julia> AbstractMesh == AbstractVector
true

This makes it impossible to write a function that dispatches on a general AbstractVector vs. an AbstractMesh. It also means that any function written for an AbstractMesh is actually claiming to support any kind of vector of any element, which seems wrong.

It's not a blocker for my work, but I think it's likely to be a minor source of annoyance going forward. Would it be possible to put some kind of type restriction on the element of AbstractMesh? Anything more restrictive than Any would fix the issue and make AbstractMesh a usable type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions