|
| 1 | +# 29 April 2024 | MessageFormat Working Group Teleconference |
| 2 | + |
| 3 | +### Attendees |
| 4 | + |
| 5 | +- Eemeli Aro - Mozilla (EAO) - acting chair |
| 6 | +- Elango Cheran - Google (ECH) |
| 7 | +- Matt Radbourne - Bloomberg (MRR) |
| 8 | +- Mihai Niță - Google (MIH) |
| 9 | +- Richard Gibson - OpenJSF (RGN) |
| 10 | +- Simon Clark - Oracle (SCA) |
| 11 | +- Tim Chevalier - Igalia (TIM) |
| 12 | +- Ujjwal Sharma - Igalia (USA) |
| 13 | + |
| 14 | +Scribe: ECH |
| 15 | + |
| 16 | +## Topic: PR Review |
| 17 | + |
| 18 | +### #776 - Avoid presumptive use of ‘always’ |
| 19 | + |
| 20 | +Merged. |
| 21 | + |
| 22 | +### #775 - Define missing definitions for ‘variables’ |
| 23 | + |
| 24 | +TIM: I’m still waiting for APP to respond. He mentioned something at the end of his comment but hasn’t followed up. |
| 25 | + |
| 26 | +### #774 - Refactor errors, adding section for Message Function Errors |
| 27 | + |
| 28 | +EAO: Do you want to get rid of formatting and selection errors? |
| 29 | + |
| 30 | +RGN: That’s just one possibility. If we’re going to keep them, further clarification is warranted. It’s not a clean category because there’s overlap. There would be redundancy in a traditional hierarchy. |
| 31 | + |
| 32 | +EAO: I’ll need to take a further look. |
| 33 | + |
| 34 | +### #773 - Add note about updates adding options causing errors |
| 35 | + |
| 36 | +Merged. |
| 37 | + |
| 38 | +### #769 - Add test:number and test:plural function definitions |
| 39 | + |
| 40 | +MIH: I would bikeshed on the the names. Instead of function, I would say selector. Also, we haven’t reserved the namespace segment test, which allows users to step on it. |
| 41 | + |
| 42 | +### #767 - Add new test schema |
| 43 | + |
| 44 | +Merged. |
| 45 | + |
| 46 | +### #755 - Effect of selectors on placeholders |
| 47 | + |
| 48 | +MIH: How do we allow for functions that change the type? For example, a function that takes a name and gives the date of birth? How do local variables interact? Even though it’s not directly about selection. |
| 49 | + |
| 50 | +EAO: That sounds like a separate matter. For complex declaration, and then you have a selector with further information in options, which references the same variable argument as the declaration. A solution of this design document will interact with the issues that you are describing. |
| 51 | + |
| 52 | +MIH: I think it’s important to address things that are tightly related in the same document. My first reaction is that you cannot touch this topic without addressing those other concerns. |
| 53 | + |
| 54 | +EAO: Maybe you are describing the separate discussion of “how do we define what a value resolves to?” If there is a separate topic, even if it relates to this, then file an issue, and we can discuss them separately. |
| 55 | + |
| 56 | +### #753 - Add design doc on function composition |
| 57 | + |
| 58 | +TIM: It’s been a while since I’ve looked at it. As a reminder, this isn’t to propose a solution but to give background. I have a separate PR to propose a solution. This is just laying out background, so I don’t know what more to do. |
| 59 | + |
| 60 | +EAO: Maybe you would be interested in reviewing this, MIH? I would like to take another look. So let’s keep this in the queue. |
| 61 | + |
| 62 | +## Topic: Issue/Design Doc review |
| 63 | + |
| 64 | +### Expression Attributes |
| 65 | + |
| 66 | +EAO: Is anyone interested in discussing this? STA is still not convinced that we need this feature. |
| 67 | + |
| 68 | +ECH: I would be interested in hearing that discussion. We have had discussions last week adding a use case for `source`. |
| 69 | + |
| 70 | +EAO: We currently don’t have a mechanism for attaching metadata to a placeholder. |
| 71 | + |
| 72 | +MIH: The way I see this is, why do we need this? They are options, like anything else. The only justification is that these can live outside a function. Isn’t that the only difference between this and options? |
| 73 | + |
| 74 | +EAO: In terms of syntax, yes. |
| 75 | + |
| 76 | +MIH: And what about in terms of functionality? |
| 77 | + |
| 78 | +EAO: The way I would differentiate them is that attributes impact the formatting context. |
| 79 | + |
| 80 | +ECH: I’m still not convinced that this is the only way to solve the problem. For example, you can make the function annotation of a placeholder optional. If it’s not specified, then the options serve as metadata for that placeholder. |
| 81 | + |
| 82 | +EAO: We could make attributes as things that never have runtime impact. Maybe we need to reserve attributes as special namespaced options so that they don’t interfere with other options, like `u:locale` or something. Would that make them more or less interesting? |
| 83 | + |
| 84 | +ECH: Are you talking about namespacing options? If so, that makes them more concerning and thus, much less interesting. Namespacing options would add a lot of complexity, and I still don’t see that they’re necessary. |
| 85 | + |
| 86 | +EAO: Namespaced options would allow implementations to provide built-in parsers for their values, rather than requiring each function author to roll their own. |
| 87 | + |
| 88 | +TIM: Can we make a decision on duplicate attributes, even if we don’t agree on attributes? |
| 89 | + |
| 90 | +EAO: I think it’s premature because we don’t yet agree that attributes should exist as a construct, even though we agree that there should not be duplicate attributes. Once we decide weather attributes should exist or not, then we can make a decision on excluding duplicate attributes. |
| 91 | + |
| 92 | +### #738 - Is it an error to pass a bad option to a function? |
| 93 | + |
| 94 | +MIH: I’m generally reluctant to have runtime errors unless they’re essential to have. With HTML, if you have junk, your page doesn’t explode – it still renders. It is not useful to give an error that isn’t actionable by the user. This does comport with how ICU does things in my ICU4J implementation. |
| 95 | + |
| 96 | +EAO: Are you saying that the ICU mandates that a fallback returns |
| 97 | + |
| 98 | +MIH: I defer to the ICU-TC. I’m just describing the situation in ICU. |
| 99 | + |
| 100 | +EAO: The spec text on formatting says that |
| 101 | + |
| 102 | +TIM: It’s true that ICU can only concurrently return one error. I want to know where we require |
| 103 | + |
| 104 | +MIH: It’s not just that. In ICU, if you return a value, then you ignore the error, and vice versa. You don’t return an error and a value at the same time. |
| 105 | + |
| 106 | +TIM: You’re correct. And I realize that I rely on that behavior in my ICU4C implementation. |
| 107 | + |
| 108 | +MIH: And ICU4C doesn’t represent errors in the same way as ICU4J. |
| 109 | + |
| 110 | +TIM: The more I think about it, the more I think that we need to design a separate mechanism to represent multiple errors. We would need to create a design proposal to the ICU-TC. |
| 111 | + |
| 112 | +MIH: Right, because that would be designing an entirely different mechanism than what exists in ICU. |
| 113 | + |
| 114 | +EAO: Is the resolution that we need in the spec text? |
| 115 | + |
| 116 | +MIH: Yes, because the spec is written in a way that forces unnatural things to different programming languages. |
| 117 | + |
| 118 | +TIM: MIH, do you mean unnatural as requiring multiple things to be returned by a programming language? |
| 119 | + |
| 120 | +MIH: Yes. Requiring things that are very difficult or impossible to represent in some programming languages and not others is not nice to have in spec text. |
| 121 | + |
| 122 | +EAO: MIH, can you file an issue in our repo and also bring this is up to the ICU-TC? |
| 123 | + |
| 124 | +MIH: Yes. |
| 125 | + |
| 126 | +RGN: EAO, are you saying that the ECMA-402 proposal for MessageFormat is influencing this requirement for multiple errors? Because ECMA-262 already includes an aggregate error object. |
| 127 | + |
| 128 | +EAO: Yes, this is uncomfortable for everybody, but the design is based on the idea that MessageFormat should not fail, as much as possible. |
| 129 | + |
| 130 | +RGN: True, but in the case of syntax errors, you – |
| 131 | + |
| 132 | +EAO: Yes, syntax errors are different. |
| 133 | + |
| 134 | +TIM: This means that #738 will be blocked on an issue that MIH will raise. |
| 135 | + |
| 136 | +MIH: Another idea why we shouldn’t force it in the spec is what RGN said about being lenient about how we choose an option from the design space. For example, RGN would be equally okay with having a solution that provides an API that includes 2 different functions (ex: format_strict and format_loose) |
0 commit comments