Skip to content

ADR-009: No generic DataArray[T]/Dataset[T]#950

Open
ecomodeller wants to merge 1 commit into
mainfrom
adr/no-generic-dataarray
Open

ADR-009: No generic DataArray[T]/Dataset[T]#950
ecomodeller wants to merge 1 commit into
mainfrom
adr/no-generic-dataarray

Conversation

@ecomodeller
Copy link
Copy Markdown
Member

Summary

Documents the decision not to make DataArray and Dataset generic over geometry type T.

The generic type parameter would only be useful in the narrow window between reading a file and the first spatial operation (isel/sel/aggregation), since those operations change the geometry type at runtime. Making the type parameter useful beyond that would require either complex overload chains or changing isel/sel semantics to preserve geometry type — both of which add complexity that serves the type system rather than the user.

Record the analysis of making DataArray and Dataset generic over
geometry type T, and why the complexity outweighs the benefits.
@ecomodeller
Copy link
Copy Markdown
Member Author

Merge #949 first

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

Successfully merging this pull request may close these issues.

1 participant