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

Swichting from OO to functional paradigma #23

Closed
wiederm opened this issue Jan 23, 2024 · 1 comment · Fixed by #21
Closed

Swichting from OO to functional paradigma #23

wiederm opened this issue Jan 23, 2024 · 1 comment · Fixed by #21

Comments

@wiederm
Copy link
Member

wiederm commented Jan 23, 2024

Currently, we are changing objects in place. This might become an issue for clarity and jax just-in-time compilation. Should we switch to a functional paradigm throughout the package and avoid in-place object modification?

@chrisiacovella
Copy link
Member

I think if we write a lot of our internal functions of classes to follow the functional paradigm we will set ourselves up better for using JIT. This has mostly been my approach thus far. E.g., the NeighborList serves as a container that can be modified in place, but the underlying functions are all functional in nature with clear inputs and outputs. This has definitely made it a lot easier to Jax-ify/jit/vmap the various functions

This was referenced Jan 30, 2024
@wiederm wiederm linked a pull request Feb 9, 2024 that will close this issue
1 task
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

Successfully merging a pull request may close this issue.

2 participants