Skip to content

What is the namespace for expression attributes ? #453

Closed
@aphillips

Description

@aphillips

In #450, there are two classes of expression attributes: built-in values such as @locale and implementation or private-use values (which might include values like @can-reorder or @_websiteId)

@eemeli proposed in the PR to use the presence of a hyphen in the name (@can-reorder) as the namespacing mechanism.
@aphillips proposed to use a starting character of underscore (@_myAttribute) as the namespacing mechanism

Both are consistent with name in that they don't require modification to the syntax to make them valid.

What we choose here should be consistent with other naming rules. We currently don't have similar distinctions elsewhere, but we are discussing using a "second character" or separate sigil for local vs. external variables in the discussion on mutability. I'm writing this issue to ensure that we making our naming schemes consistent so that we don't have different naming requirements in different parts. If would be weird to require (for example) a hyphen in expression attributes but an underscore for local vars:

let $_local = {:amendLocale nu=Latn @locale=th-TH @some-attr=foo}

Metadata

Metadata

Assignees

No one assigned

    Labels

    LDML45LDML45 Release (Tech Preview)syntaxIssues related with syntax or ABNF

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions