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

Unions for base types #147

Merged
merged 8 commits into from
Feb 7, 2022
Merged

Unions for base types #147

merged 8 commits into from
Feb 7, 2022

Conversation

hadley
Copy link
Member

@hadley hadley commented Feb 4, 2022

  • Adds numeric, atomic, and vector unions
  • Adds expression base type

Fixes #77. Fixes #94.

* Adds expression base type

Fixes #77. Fixes #94.
@hadley hadley mentioned this pull request Feb 4, 2022
@hadley
Copy link
Member Author

hadley commented Feb 4, 2022

@DavisVaughan can you take a look at this PR too? The goal is to treat "numeric", "atomic", and "vector" like unions; i.e. you can't extend from them, but you can dispatch and use in properties.

Copy link
Collaborator

@DavisVaughan DavisVaughan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice!

R/zzz.R Outdated Show resolved Hide resolved
R/zzz.R Outdated Show resolved Hide resolved
src/dispatch.c Show resolved Hide resolved
tests/testthat/_snaps/zzz.md Show resolved Hide resolved
tests/testthat/helper.R Show resolved Hide resolved
tests/testthat/test-class.R Show resolved Hide resolved
tests/testthat/test-class.R Show resolved Hide resolved
@hadley hadley merged commit a6cfc8d into master Feb 7, 2022
@hadley hadley deleted the base-unions-3 branch February 7, 2022 22:49
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.

Integer should inherit from numeric? Should vectors extend common vector type?
2 participants