Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Don't dive into the code without reading this description and understanding it, or without reading and understanding the javadocs.
This pull request is number three of three mutually exclusive options. It sketches a "loader" API for loading configuration-related objects in some vague unspecified manner. This pull request is named Option 3. You may also be interested in Option 1 (#131) and Option 2 (#132).
Sample usage:
In as many cases as I could, I asked for and incorporated some group opinions while working this sketch up. See for example #75, #109, #110, #119, #122 (particularly my comment and Roberto's response), #124, and #127, among others.
Option 3 (this PR) differs from Option 2 (#132) primarily by modeling the "loader API" with an explicit
Response
object as its return value. This provides a place where evolution of what it means to have loaded an object can proceed with minimal damage to the actual loader API itself (theResponse
interface changes, theload
method does not). As in Option 2 (#132), theload
method accepts aRequest
.In Option 3 (this PR), as in Option 1 (#131) and Option 2 (#132), I followed the group consensus arrived at in #119 (see Dmitry's comment in particular) around the loaded object's determinacy (i.e. that it is unspecified for now to allow for evolution in the future). This option differs from the others in that it supplies a place for that evolution to occur: the
Response
object can tell you whether it is determinate or not. TheResponse
object may be able to tell you other things about the returned object in the future.I personally prefer this option over the others, but:
Finally, and perhaps most importantly, I still think it is far too early for PRs and I would prefer to write documents first, but to date that has not met with success. Therefore I hope this (and the other options) will at least get the discussion going.
Signed-off-by: Laird Nelson ljnelson@gmail.com