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

@reset naming convention #111

Open
rveltz opened this issue May 30, 2023 · 4 comments
Open

@reset naming convention #111

rveltz opened this issue May 30, 2023 · 4 comments

Comments

@rveltz
Copy link

rveltz commented May 30, 2023

Hi,

If I understand well, the macro @reset is the equivalent of Setfield.@set!.

Why did you chose to remove the !

Thank you

@jw3126
Copy link
Member

jw3126 commented May 30, 2023

I did not like @set! because the ! usually means mutation. But instead the macro rebinds the variable, without any mutation.

@jw3126
Copy link
Member

jw3126 commented May 30, 2023

Also, I had some vague plans to use @set! for actual mutation, but that never happened so far.

@rveltz
Copy link
Author

rveltz commented May 30, 2023

I am asking this because I use a lot @set! in BifurcationKit and I am thinking moving to Accessors

@aplavin
Copy link
Collaborator

aplavin commented May 30, 2023

See also this thread #93 (comment) for set!/reset discussion.

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

3 participants