-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename MessageContext to FluentContext #222
Comments
I agree that we can rename them. The only reservation I have is about the context. There's a difference between what we think of a context and what consumers use. It's been bothering me every since we wrote it that we use the term "context" to describe a low-level, hidden object that collects/flattens a bunch of resources together, which makes us have to come up with different term for the thing that people actually use (which is now called It came back as we work on the
What is it that we have one of here, and what is it that we have two of here? Using current naming, we have a single That means we have to teach this vocabulary to our users, who just want to do It feels very natural to replace I don't have solutions yet, but I know that trying to talk about Is it something you'd be willing to add to this round of naming conversations? |
We can also hide complexity on the developer-API level, and lie. I agree that we're likely going to name that thing Context to the developer. I don't think that there's value in telling the developer that in between the API and the Context there's the I think not talking about the LLOCTKYF is a good thing in practice, and highlights the pieces that the developer cares about. |
I was hoping for this issue to be a matter of a simple search and replace. I didn't mean to (re-)start this discussion. I'm quite happy with Another way out of this is to side step this discussion and drop context entirely. We could then use it as a concept to explain the architecture. The API names would not use it, however:
|
One more thing about the subjectivity of some arguments.
I'd like to emphasize that this is subjective. For example to me, it feels very natural to say: They want values out of And I think we can teach people this vocabulary without a problem. |
CC @6a68, @fzzzy, @flodolo, @Gregoor, @hkasemir, @ianb, @jimporter, @juliandescottes, @julienw. I'm looking for opinions about You've all worked with Fluent in some capacity in the past. You've all written your share of Thanks! |
Sorry, I don't have much of a preference. Both seem like sensible options to me 🙂 |
Renaming MessageContext to FluentContext is a good move, it will make it clear that the object we are dealing with is fluent specific. From my perspective bundle makes more sense than context, but that's probably just because I have come across the term "message bundle" in other stacks. But I don't have a strong preference, because as a user, after creating contexts I pass them as |
I would say the opposite actually (though I don't care that strongly); we already know it's a Fluent thing because we imported it from Fluent. Modules generally don't reiterate their name in the names of the symbols inside the module (e.g. React has The |
This dropped off my radar. I'd like to find a way to move forward. It looks like there is a slight preference to using I think what this issue needs is a decision, so I'm going to make it :) Let's do the following renames:
I'm going to leave this issue open for another week, until Thursday, August 16. If I don't hear any significant opposition to the above plan by then, I'm going to implement the new names and land. Thanks to everyone for taking time to share your opinions! |
I'm a fan of those changes! The only one I'm not sure is the Would that means that we can then do |
Thanks, @zbraniecki!
Because the base class is called Line 14 in e71f9b4
While not a goal, it's also nice that the same vocabulary is used in Rust and in Python:
This is out of scope of this issue :) Please open a new one if you'd like to have this conversation. |
I opened #276 to implement this. |
#276 has been merged and
|
I propose to make the Fluent API more explicit about relating to Fluent.
Originally we chose the
MessageContext
name as an evolution ofMessageFormat
thinking about the possible standardization in the future. This is a noble goal but we can cross that bridge when we get there. It's probably even better to not use this name right now in production code. I also hope that it will make the code easier to work with (debug, read stack traces) and easier to name other APIs consistently if we use theFluent
prefix.MessageContext
→FluentContext
MessageArgument
→FluentType
MessageNumberArgument
→FluentNumber
MessageDateTimeArgument
→FluentDateTime
The text was updated successfully, but these errors were encountered: