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

Suggestion for Naming convention #178

Open
sebffischer opened this issue Sep 22, 2024 · 0 comments
Open

Suggestion for Naming convention #178

sebffischer opened this issue Sep 22, 2024 · 0 comments
Labels
theme-internals Relates to internal operations of the language

Comments

@sebffischer
Copy link
Collaborator

sebffischer commented Sep 22, 2024

Due to all the interior mutabilty I sometimes get confused whether methods modify an object via interior mutability or whether they clone the object, modify it and return it as a new value.

In pytorch, methods that mutate an object in-place end with an underscore.
What do you think about applying this naming convention here as well?
For example the Rep<T>::materialize_inplace() method would then be called materialize_()

@sebffischer sebffischer added the theme-internals Relates to internal operations of the language label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme-internals Relates to internal operations of the language
Projects
None yet
Development

No branches or pull requests

1 participant