Skip to content

Add semiliteral expression for computed arrays and objects #7933

Description

@CommanderStorm

User Story

As a style author, I have heard an ask to construct arrays containing expressions, so that style authorws can compute array values dynamically instead of being limited to static literal arrays.

Rationale

literal exists to represent static arrays and objects.
However, many style properties accept arrays whose elements would naturally be computed from expressions. Today, there is no way to do this without awkward workarounds, and some use cases cannot be expressed at all.

A new semiliteral expression would preserve the existing semantics of literal while evaluating expressions within arrays and objects. This makes the expression language more consistent and enables dynamic construction of array-valued properties without breaking existing styles.

Impact

Without semiliteral, authors must duplicate expressions, rely on unintuitive workarounds, or are unable to express certain data-driven styles. Supporting computed arrays makes the style specification more expressive while remaining backwards compatible.

AI Assistance

With assistance for summarisation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions