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

immutability #8

Open
thejohnfreeman opened this issue Mar 28, 2015 · 1 comment
Open

immutability #8

thejohnfreeman opened this issue Mar 28, 2015 · 1 comment

Comments

@thejohnfreeman
Copy link
Collaborator

Configurations should be immutable. Compositions should preserve immutability and return new configurations. Yea or nay? I don't regard this as an important feature since most of the time clients don't need to keep around multiple configurations, but it might come in handy down the line and generally doesn't cost that much. Additionally, it is possible to provide both mutating and non-mutating versions of compositions, so one option is to have both.

@sampsyo
Copy link
Member

sampsyo commented Mar 29, 2015

That's a good question. In my experience, mutating configurations—for the purposes of lazy loading, overlaying with command-line flags, etc.—is the source of many frustrating bugs, so it would be great to at least explore what an immutable API would look like.

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

No branches or pull requests

2 participants