Skip to content

Traits, functions, defaults #1

@andyferris

Description

@andyferris

I'm excited someone is looking into this. :)

Apart from the design of a formal array interface (definition of traits such as mutability) I was wondering what the "meta" design decisions about how the traits are defined and discovered are.

Base has used "Tim Holy" traits in a number of places to help with e.g. iteration performation. I note the initial version here uses an ismutable function that returns a constant value.

I was wondering what the trade-offs are between type traits vs functions (and constant propagation / branch pruning) might be and what would be preferable. Are traits properties of types or of instances?

Also whether one wants "defaults" like ismutable(::AbstractArray) = true or false are desirable, or something to avoid. (One thing I like about the current system is one can create a simple abstract array with about 2 or 3 method definitions).

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