-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Labels
breaking-changeIssues and PRs that are breaking to fix/merge.Issues and PRs that are breaking to fix/merge.c: exportComponent: export (mod export, derive)Component: export (mod export, derive)quality-of-lifeNo new functionality, but improves ergonomics/internalsNo new functionality, but improves ergonomics/internals
Milestone
Description
While #886 was an interesting addition to the library, some of its decisions are dubious in necessity:
- The addition of
gdnative::export::IndexBounds, whose functionalities largely duplicate the standardstd::ops::RangeBoundstrait. - The use of
TryFromfor tuple impls, which as opposed to the existingFromVarargs:- Can only report a single error, instead of all the errors.
- Does not have the same composability (
FromVarargstypes can be chained for common argument sets). - Is unused anywhere else.
- Introduction of a new
VarargsErrortype, that:- Does not work with the existing
gdnative::export::ArgumentErrortype, but duplicates its functionality instead. - Lacks the ability to be reported with a
Site. - Is unused anywhere else, anyway.
- Does not work with the existing
- Addition of APIs that needlessly expose internals, and can complicate future changes.
- Method arguments are meant to be accessed sequentially, required ones followed by optional ones.
FromVariantconversions are meant to be done only once, because otherwise it's just unnecessary inefficiency. AccessingVarargsin any other way is most certainly a user error, and should not be enabled by the API design. - That
Varargsis internally a slice should have remained an implementation detail, because there exist reasons why we might want to change that later, like in case we uncovered a source of UB during the conversion.
- Method arguments are meant to be accessed sequentially, required ones followed by optional ones.
We probably want to re-consider how much of these are actually useful to the end user, and deprecate/remove things that are mostly cruft.
Metadata
Metadata
Assignees
Labels
breaking-changeIssues and PRs that are breaking to fix/merge.Issues and PRs that are breaking to fix/merge.c: exportComponent: export (mod export, derive)Component: export (mod export, derive)quality-of-lifeNo new functionality, but improves ergonomics/internalsNo new functionality, but improves ergonomics/internals