Skip to content
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

(fluent.runtime) Add a FluentString type #84

Open
stasm opened this issue Jan 24, 2019 · 0 comments
Open

(fluent.runtime) Add a FluentString type #84

stasm opened this issue Jan 24, 2019 · 0 comments
Labels
fluent.runtime Issues related to the fluent.runtime module.

Comments

@stasm
Copy link
Contributor

stasm commented Jan 24, 2019

Arguments to FluentBundle.format may currently be instances of FluentType subclasses, or Uniode strings (str in Python 3). This mirrors the optimization from fluent.js, where primitive strings are treated as if they were FluentTypes thanks to supporting the same {toString, valueOf} interface. The same optimization was applied to the contents of TextElements and StringLiterals.

Would it make sense to drop this optimization? Perhaps the impact wouldn't be as significant in Python as it was in JS. And the benefit would be that the mental model of the resolver would become simpler, with one exception fewer.

@spookylukey What do you think?

@stasm stasm added the fluent.runtime Issues related to the fluent.runtime module. label Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fluent.runtime Issues related to the fluent.runtime module.
Projects
None yet
Development

No branches or pull requests

1 participant