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

Array field values should be preserved (like Collections) and new values appended #6

Closed
remkop opened this issue Feb 4, 2017 · 1 comment

Comments

@remkop
Copy link
Owner

remkop commented Feb 4, 2017

Currently array fields (Params or option) are always initialized to a new array instance, regardless of what the current value is.

Collections however are only instantiated when they are initially null, otherwise values are added to the original collection instance.

This asymmetry is undesirable.

Note: we may want to support map-like options like -Da=b -Dx=y. Behaviour for map-like containers should be consistent with arrays and collections.

@remkop remkop modified the milestones: 0.1.0 basic option parsing, 0.2.0 usage online help, 0.3.0 usage online help, 0.4.0 user manual Feb 5, 2017
@remkop
Copy link
Owner Author

remkop commented Mar 18, 2017

Symmetry can be restored by treating arrays similar to collections: create a new array containing the old values as well as the new values.

@remkop remkop changed the title Should Collections be instantiated unconditionally like array fields? Array field values should be preserved (like Collections) and new values appended Mar 31, 2017
@remkop remkop closed this as completed in 6ffd88f Mar 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant