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_()
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 calledmaterialize_()