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

FormatStyle & Mutability & Sendability & Inlinable #6

Merged
merged 6 commits into from
Sep 12, 2024

Conversation

lvalenta
Copy link
Contributor

This MR adds:

  • support for Foundation.FormatStyle – I tried to support the same API as Date, supporting similar parameters. Since we need to support a protocol where we want different defaults, I felt it was cleaner to just copy the implementations, otherwise we would have to take generic _DateComponentsConvertible which we would then need to make public, and I am not sure it is worth it, since the implementation is quite trivial.
  • explicit conformance to Sendable
  • @inlinable across
  • changes constants to var for better work with NaiveDate structures. I understand non-mutability arguments, however, I think we should stick with them in projects and not generic packages that are here to help users. If we wanted to change just one day, I think the API should allow it.

@lvalenta lvalenta changed the title Mutability & Sendability & Inlinable FormatStyle & Mutability & Sendability & Inlinable Sep 12, 2024
@kean
Copy link
Member

kean commented Sep 12, 2024

Brilliant work, thank you!

@kean kean merged commit a429d82 into CreateAPI:master Sep 12, 2024
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants