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

Instantiate Binder instead of specializing it #14

Merged
merged 3 commits into from
Jun 23, 2023
Merged

Conversation

mthuurne
Copy link
Member

Up until now, the Binder class was specialized using a type argument (Binder[Config]) rather than instantiation (Binder(config)). The specialization complicates the code for no clear benefit. In fact, it had the disadvantage that use of a non-specialized Binder had to be flagged as an error at runtime instead of during type checking.

There is backwards compatibility code to support the old syntax for a while, but not necessarily all the way up to 1.0.

mthuurne added 3 commits June 23, 2023 15:49
The specialization complicates the code for no clear benefit. In fact,
it had the disadvantage that use of a non-specialized `Binder` had to
be flagged as an error at runtime instead of during type checking.

There is backwards compatibility code to support the old syntax for
a while.
While we've been using this library exclusively for configuration
so far, it could be used for other purposes as well, especially if
at some point we start parsing JSON.
@mthuurne mthuurne force-pushed the instantiate-binder branch from 341583a to a39cbd0 Compare June 23, 2023 13:53
@mthuurne mthuurne merged commit ef10b48 into main Jun 23, 2023
@mthuurne mthuurne deleted the instantiate-binder branch June 23, 2023 13:55
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.

1 participant