Skip to content
This repository has been archived by the owner on Jan 1, 2020. It is now read-only.

List and Enumerable do very similar things. Consolidate them? #11

Open
rubberduck203 opened this issue Oct 15, 2014 · 3 comments
Open

Comments

@rubberduck203
Copy link
Owner

Do we need both Enumerable and List? Should we consolidate functionality, or simply refactor them so that one calls the other to remove code duplication?

@ptwales
Copy link
Collaborator

ptwales commented Oct 15, 2014

I say push the most primitive functionality's from Enumerable to List and have Enumerable be a pseudo Sub Class of either List or TypedList, since Enumerable is immutable and List isn't.
Enumerable should be the most commonly used class though. List should just be for sub-classing.

@rubberduck203
Copy link
Owner Author

@ptwales what did you have in mind when you say "primitive functionality"? We should come up with a list of methods to move.

@ptwales
Copy link
Collaborator

ptwales commented Oct 15, 2014

I'm thinking:

  • ToArray
  • Create
  • CreateFrom
  • Replace Append(variant) with Add(ParamArray)
  • First
  • Last

And maybe renameFirst with Head and create Tail and Init. But those might make more sense in an immutable class.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants