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

Consider removing constructor options #504

Closed
peterstace opened this issue May 2, 2023 · 2 comments
Closed

Consider removing constructor options #504

peterstace opened this issue May 2, 2023 · 2 comments
Assignees
Labels
breaking change These will break the API improve Improve (or remove) an existing feature up next What we're planning to do next

Comments

@peterstace
Copy link
Owner

Right now, there are only 2 constructor options:

  • Disable validations.
  • Omit invalid.

The construction options are provided via the functional options pattern via the geometry constructors.

Omit invalid was only really added to "prove" that there was more than one option and therefore the functional options pattern was warranted.

We should consider to:

  • Retire the omit invalid construction option.
  • Change from functional options to something simpler. E.g. 2 functions for each constructor, NewPoint and NewPointWithoutValidation.
@peterstace peterstace added improve Improve (or remove) an existing feature breaking change These will break the API labels May 2, 2023
@peterstace
Copy link
Owner Author

Another nice thing about having separate "unvalidated" constructors is that those function signatures don't need an error in the return.

@peterstace
Copy link
Owner Author

See #525 for discussion about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change These will break the API improve Improve (or remove) an existing feature up next What we're planning to do next
Projects
None yet
Development

No branches or pull requests

1 participant