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

Add mutable configurable #768

Merged
merged 2 commits into from May 10, 2020

Conversation

aidantwoods
Copy link
Collaborator

Configurables are designed to be immutable because it makes working with them and reasoning about their values much easier (see: #708 (comment)), however in some very special cases mutability might be required to create special behaviours (envisioned use case for this is mostly where definitions are recorded and need to be accessible by the whole parsing tree).

To quote the embedded description for the MutableConfigurable interface:

Beware that the values of MutableConfigurables are NOT stable. Values SHOULD
be accessed as close to use as possible. Parsing operations sharing the same
State SHOULD NOT be triggered between where values are read and where they
need to be relied upon.

Hopefully I do not regret this...
This is a slightly more correct implementation, but perhaps not worth
the headache.
@aidantwoods aidantwoods added this to the 2.0.0 milestone May 10, 2020
@aidantwoods aidantwoods added this to In progress in 2.0.0 via automation May 10, 2020
@aidantwoods aidantwoods moved this from In progress to Done in 2.0.0 May 10, 2020
@aidantwoods aidantwoods merged commit 74df602 into erusev:2.0.x May 10, 2020
@aidantwoods aidantwoods deleted the feature/mutable-configurable branch May 10, 2020 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
2.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant