chapel-lang / mason-registry

Package registry for mason, Chapel's package manager
17 stars 25 forks source link

UnrolledLinkedList toml file #36

Closed ahsankamal closed 4 years ago

ahsankamal commented 4 years ago

UnrolledLinkedList is a variant of the Linked list which stores multiple elements in each node. So far, I have implemented append and pop procedure and these() iterator to iterate over the elements of an UnrolledLinkedList. I am working on this mason package currently for GSOC proposal. I opened a PR to get feedback on the implementation of the append, pop and these() procedures and if I am moving in the correct direction with the implementation. I have used List for storing elements of UnrolledLinkedList. Should I use an array instead? or Is List a better option? Should I inherit List in UnrolledLinkedList class?

ben-albrecht commented 4 years ago

@krishnadey30 - are you able to take a look at this?

krishnadey30 commented 4 years ago

@ben-albrecht I will take a look at it tomorrow.

ben-albrecht commented 4 years ago

I have used List for storing elements of UnrolledLinkedList. Should I use an array instead? or Is List a better option?

A list is acceptable, especially if you intend to resize the list. You may reconsider arrays in the future if performance demands it.

Should I inherit List in UnrolledLinkedList class?

I don't think this is necessary.