-
Notifications
You must be signed in to change notification settings - Fork 5
Ref/vec #180
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
Merged
Merged
Ref/vec #180
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
678b5c0 to
1af2255
Compare
Owner
|
Let me know when you're ready for review |
sebffischer
commented
Oct 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(Description is still WIP)
Overview of Changes:
Rep<T>now allows for non-atomicTs. Specifically this now allowsListto be simply represented as anRep<T>. Furthermore this will also support named vectors because the (optional) naming mechanism was integrated into theRepstruct.Rep<T>towards a more stable API. E.g. it is now possible to iterate over immutable references of the vector representation, representing the subsets. This can be done viarep.pairs_ref().iter()(.pairs_ref_iter()would not work due due lifetime issues and the restrictions of thenetxt(&mut self)signature in theIteratortrait; I think this might be achievable with unsafe but I want to refrain from this for the time being)is_null(x)andall(...),is_na(x)primitives that allow for better testing through via the R interpreter (r_expect!,r!). The documentation ofallincludes a section on 'Deviations from R'.listtonullnow does not remove this element anymore but actually sets it tonull.Bug Fixes:
[[.<-assignment has been fixed: Bug when accessing nested list #179 (comment)length()function now works forlists.lists viac()now works as expected: (c()primitive behaves differently than inRwhen coercing to a list #177). E.g.c(list(1), list(2))evaluates tolist(1, 2).names()now respects subsets:names()does not respect subset #181Open Issues / Questions:
$.<-assignment was broken for environments by this PRinternal_err!()instead ofunimplemented!()where possible$and[[internally. I think this should also fix: Bug when accessing nested list #179 (comment)c()primitive behaves differently than inRwhen coercing to a list #177decide whether we want to allow subsetting with NA.--> not in this PR.fixwill do this in a new PRlist(1)[[na]]andlist(1)[na]Next (bigger) steps
I would plan to continue focusing on the vector representation to polish the internals and further improve the behavior.
This includes: