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

Remove proxy check in vec_is_list() #1222

Merged
merged 4 commits into from
Aug 17, 2020

Conversation

DavisVaughan
Copy link
Member

Part of #1208

The proxy check was originally suggested here #1003 (comment). I am not convinced that we need it, and it would help with list-rcrds outlined in #1208 to remove it.

I really like how simple vec_is_list() is now. It is very easy to explain.

Internally, we do not currently use vec_is_list() in any way that could cause issues after removing this restriction. We never proxy x after checking that it is a list with vec_is_list(). We only use it in:

  • vec_unchop() to check that x is a list
  • vec_unchop() to check that indices is a list
  • list_sizes() to check that x is a list

I think all of these are valid and safe uses of vec_is_list()

@DavisVaughan DavisVaughan merged commit c0dcd3f into r-lib:master Aug 17, 2020
@DavisVaughan DavisVaughan deleted the vec-is-list-check branch August 17, 2020 17:02
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.

2 participants