[FEEDBACK] Consider disallowing duplicate attribute names
Duplicate option names are a data model error, while duplicate attribute names are allowed.
This makes the implementation a little more complicated, as the code is less uniform when it comes to parsing options vs. attributes.
I know that since attributes are reserved for future use, it might be a bit weird to emit errors related to them. Still, unless there's a use case for multiple attributes with the same name, maybe it's worth specifying that attribute names, like option names, must be unique?
I agree!
On Fri, Mar 29, 2024, 15:02 Tim Chevalier @.***> wrote:
Duplicate option names are a data model error, while duplicate attribute names are allowed.
This makes the implementation a little more complicated, as the code is less uniform when it comes to parsing options vs. attributes.
I know that since attributes are reserved for future use, it might be a bit weird to emit errors related to them. Still, unless there's a use case for multiple attributes with the same name, maybe it's worth specifying that attribute names, like option names, must be unique?
— Reply to this email directly, view it on GitHub https://github.com/unicode-org/message-format-wg/issues/756, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJLEMHETK4BAL52HOUB443Y2XQGVAVCNFSM6AAAAABFO7ACQGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYTMMBTG4ZDONA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I agree. And actually proposed this already, but needed to leave it out of our spec for '45: https://github.com/unicode-org/message-format-wg/pull/751#discussion_r1538205517.