js: Mark simplifyWithAttributes and simplifyPoints as experimental #627
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.
Both functions are marked as experimental in C++ code; their interface and implementation is subject to change. In JS, if the interface of these functions changes, it may lead to subtle or not-so-subtle issues with these functions. For now we require the caller to opt into the use of these functions by setting a module-level experimental boolean.
I am not 100% sure this is a great idea :) but the sensible alternative seems to be just marking them as experimental in the documentation... I mainly would like to avoid the situation where the NPM update to a future version silently breaks the users who decided to rely on the specific behavior of these functions. simplifyPoints is not very likely to change but is relatively new, and simplifyWithAttributes is very likely to change in so far as the error metric is concerned, and maybe other aspects of the implementation.
That said, given that these aren't even documented atm maybe a comment in
.d.ts
and.js
file would suffice?