Skip to content

Parameterized Messages #258

Closed
Closed
@eemeli

Description

@eemeli

Reading through the BNF, I was surprised by this:

fluent/spec/fluent.ebnf

Lines 67 to 68 in aa89b97

MessageReference ::= Identifier AttributeAccessor?
TermReference ::= "-" Identifier AttributeAccessor? CallArguments?

Having then read through some of the history (In particular #176 and this comment on #80), I think I sort of understand the reasoning here, but I believe in actual use it could still prove rather surprising.

The usage pattern I have in mind here is first implementing a parameterised term, and later having a need for using that term directly as a message. In that situation, replacing -term with term in messages won't work, as {term(foo:"bar")} is not valid syntax.

If there's a longer-term intent of differentiating the capabilities of terms and messages more, then this difference makes sense. As is it seems to be the only thing that you can do with a term but not with a message, and that's a bit odd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions