Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Should we have some common interfaces for collections? #72

@DanielGronau

Description

@DanielGronau

So far I'm really missing good examples how to build a sound collection hierarchy.

One thing we could do better than the Java API is to use self-types.

Further, I was playing around with the slightly crazy idea to see every collection as something map-like, with "keys" to access "values". These "keys" could be unit (e.g. for a stack or a stream), an enum for front and back (for a dequeue), integers (for random access lists) or the elements itself (for sets). See https://github.com/neco4j-team/neco4j for a sketch of such a hierarchy, starting with org.neco4j.collect.Coll as top-level interface. This is work in progress, and I'm not convinced that it will lead to something useful.

What do you think, do we need some abstraction for our collections? Or are stand-alone collections good enough?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions