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

Defensive programming #8

Open
AleMorales opened this issue Nov 8, 2023 · 0 comments
Open

Defensive programming #8

AleMorales opened this issue Nov 8, 2023 · 0 comments

Comments

@AleMorales
Copy link
Member

Make sure that inputs passed to the public API are always valid. We should not repeat assertions in internal functions but that probably means wrapping inputs into dedicated data types such that assertions are only made once when constructing the data type. Some things may be hard to detect automatically like:

  • Using different lengths for power in materials and light sources (maybe a check inside the material?)
  • Incorrectly using the grid cloner (rely on templates provided as how-to guides)
  • Using the wrong units (e.g., are angles in radians or hexadecimal degrees). Here we could go for consistency: public API always in degrees, and internally always in radians.
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

1 participant