Replies: 4 comments 3 replies
-
My main piece of feedback is that the document and the use-cases are written in a way that attempts to justify a particular design. We start with the idea to add new syntax, and we look for problems that we could solve through this addition. When all you have is a hammer... I'd like to instead start with problems. I think there are a few:
Problem 1: XLIFF attributesAnchoring the design in this problem can help limit the scope of the proposal. I think we should consider spannables as a solution for this problem, as they would map in the most direct manner to the actual XLIFF.
Problem 2: Semantic commentsIn #53 we decided that semantic comments were out of scope for MF2. Problem 3a: Runtime data about placeholdersWe already have a way to decorate placeholders on the runtime: we do it via annotations by formatting functions. For the rare cases where more than one annotation would be required, we can recommend using local variables to chain multiple annotations.
In the snippets above, I’m using Problem 3b: Runtime data about spans of textI think we should better document the goals and the use-cases of this problem. I can see a few:
One of the examples in the proposal is:
But this only works for simple contents with no placeholders. Instead, I think a similar approach to |
Beta Was this translation helpful? Give feedback.
-
The proposal currently states:
Would it also be possible to register custom attributes in the registry? |
Beta Was this translation helpful? Give feedback.
-
As always, I'm also concerned about adding a new sigil to the syntax. With some of the recent syntax changes proposals, we're potentially looking at things like Individually, a decision to add a new sigil is often well justified. However, we have an opportunity (and a responsibility!) to look at the syntax holistically and prevent it from becoming too cryptic due to a heavy use of sigils. Because the proposal currently suggests adding |
Beta Was this translation helpful? Give feedback.
-
These comments are all good, but isn't this what the design doc and its PR are for? Do you think it's too difficult to make these comments on that draft? |
Beta Was this translation helpful? Give feedback.
-
#458 introduced the design proposal to add expression attributes to the syntax. #473 expanded it to include more use-cases and alternatives. I'm opening this discussion to have a place to continue the conversation about the proposal.
Note
This is a GitHub discussion. Each top-level comment starts a new thread; see the Write a reply inputs below each top-level comment. Feel free to comment more than once to give other participants an opportunity to respond just to a specific point.
Beta Was this translation helpful? Give feedback.
All reactions