Remove error and ctor options from direct ctors #530
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Modify direct constructors (
NewPoint
etc.) to no longer perform validation at all. The direct constructors are for more advanced use cases where geometries are being constructed from other geometries or raw sequences of floats. Things like custom geometric algorithms come to mind. Because these are for advanced use cases, making users validate manually is reasonable.Modifying direct constructors removes error handling mismatch, with users no longer having to handle errors that can never occur (when validation is disabled). It also eliminates the situation where constructor options would sometimes be ignored, and simplifies the rules around what validation occurs during direct construction (i.e. now none is performed).
See #525 for more context.
Check List
Have you:
Added unit tests? Yes.
Add cmprefimpl tests? (if appropriate?) N/A.
Updated release notes? (if appropriate?) No. This will be done when all constructor option changes are complete.
Related Issue
Benchmark Results
Benchmark results are attached. Some notes about the apparent regressions:
results.txt