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

Implement Variable Length Lists with `elist` and `vlist` #29

Open
brodieG opened this issue Jun 3, 2017 · 1 comment
Open

Implement Variable Length Lists with `elist` and `vlist` #29

brodieG opened this issue Jun 3, 2017 · 1 comment
Labels
Milestone

Comments

@brodieG
Copy link
Owner

@brodieG brodieG commented Jun 3, 2017

elist (Extensible List, could be xlist too) is an extensible list, where objects are accepted assuming that they have every element that is present in the template. This is supposed to mimic S4 objects where objects that inherit from another contain all the slots of the other. Some unresolved questions are whether the subset of elements must be first and in the same order as in the template, and whether named objects should be treated differently. In terms of implementation, elist will probably produce and S4 object that will trigger special treatment.

One question is how we do something like structure(elist(...), attra, attrb) etc. as then the return value of elist can hardly be S4 as there could be conflicts between slots and attributes.

vlist (Vector List) is a variable length list with the same template repeated n times. TBD whether we allow a repetitions argument, or whether people should use a normal list template for those.

@brodieG brodieG added the enhancement label Jun 3, 2017
@brodieG brodieG added this to the 0.2.0 milestone Jun 3, 2017
@brodieG
Copy link
Owner Author

@brodieG brodieG commented Jun 13, 2020

For these, the S4 template would keep the actual template as an object. Will need to measure overhead of using S4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.