Alternative syntax for accessing and changing MizerParams slots #213
Labels
enhancement
New feature requests or suggestions for enhancement of existing features
setting parameters
Issue relates to the part of mizer used for setting up MizerParams objects.
Currently, to change for example the
intake_max
slot in a MizerParams object calledparams
to a new value calledmy_intake_max
one would doThis kind of notation is convenient if one uses the pipe operator, but clunky otherwise. Sometimes it would be nice to simply do
This is as brief as the old
but would provide the advantage of automatic validation of the new value and of protecting the value from accidental overwriting, as discussed in https://blog.mizer.sizespectrum.org/posts/2021-08-08-change-model-parameters-without-using/
It is also in line with how we change
species_params
,gear_params
andresource_params
.The text was updated successfully, but these errors were encountered: