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

Order of arguments in set_parameter! is reverse of what is should be... :( #222

Open
Datseris opened this issue Oct 8, 2024 · 0 comments
Labels
breaking qol quality of life

Comments

@Datseris
Copy link
Member

Datseris commented Oct 8, 2024

set_state! and set_parameter! have different ordering. State has first the value then the index, while parameter has first the index then the value. First, these two should be consistent. Second, they should follow Julia base syntax which is:

setindex!(collection, value, key...)

Store the given value at the given key or index within a collection. The syntax a[i,j,...] = x is converted by the compiler to (setindex!(a, x, i, j, ...); x).

Unfortunately there is no way to fix this :( because the parameter values could have the same type as the index (such as integers) so there is no way to fix this without making a huge breaking change. :( :( :(

@Datseris Datseris added breaking qol quality of life labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking qol quality of life
Projects
None yet
Development

No branches or pull requests

1 participant