Skip to content

Don't allow Tangent{T} where T is an Array or a primative type? #496

@oxinabox

Description

@oxinabox

Similar in spirit to #495 .
Tangent is for composite objects.
So maybe we shouldn't let people try and put objects that are not make up of fields inside it.

Potentially we could detect this with feildcount or isprimativetype + isa Array

julia> fieldcount(typeof([1]))
0

julia> fieldcount(typeof(1))
0

julia> isprimitivetype(typeof([1]))
false

julia> isprimitivetype(typeof(1))
true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Structural TangentRelated to the `Tangent` type for structured (composite) values

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions