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

Start adding concrete format functions #5688

Closed
wants to merge 1 commit into from

Conversation

sffc
Copy link
Member

@sffc sffc commented Oct 15, 2024

#5269 (comment)

This approach we discussed doesn't completely work because it doesn't accomplish the type inference I wanted to see, because I need to accept a Date<A: AsCalendar>, not an actual concrete Date<C>. This voids most of the benefit of having concrete functions because then you can't .into() or .parse() into the type being formatted.

Thought: if I made .format_date take a concrete Date<C> (disallowing the use of Ref), I could keep .format as-is, and then these concrete format functions become nice-to-haves that can be added on later. I think this is most aligned with the design @Manishearth had preferred anyway.

Would be nice to land this in 2.0-Alpha, but it's fine if it changes in 2.0-Beta.

CC @Manishearth @robertbastian

@sffc sffc added the discuss-priority Discuss at the next ICU4X meeting label Oct 15, 2024
@sffc
Copy link
Member Author

sffc commented Oct 18, 2024

Will re-do this.

@sffc sffc closed this Oct 18, 2024
@sffc sffc deleted the concrete-fmt branch October 18, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss-priority Discuss at the next ICU4X meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant