Skip to content

Use another composition operator #230

Description

@davidanthoff

Right now we use the + operator both for layered plots and for sub specs like repeat, facet etc. That is kind of confusing. I think generally we should use two operators for this, one for layering, and a different one for sub specs.

One idea would be to use & for layering, and + for sub specs. The benefit is that & has higher precedence, and I think that is what we want for layering. So something like

@vlplot(repeat=...) + p1 & p2 & p3

Would repeat a sub plot that has three layers.

One thing that I don't like about + is that normally folks probably assume it is symmetric, but in our use case it is not. I guess one question is whether there is some alternative infix operator that more clearly is non symmetric that we could use. Bonus if we would find one that has lower precedence than +, so that we could use + for layering :)

@tkf and @mcmcgrath13, I'd be very interested to hear your thoughts on this!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions