Skip to content

Should F# lists implement ICollection? #570

@eiriktsarpalis

Description

@eiriktsarpalis

I just noticed that F# lists do not implement the ICollection interface. This means that it is currently impossible to quickly extract the length of a list of unknown type unless using some form of reflection and/or appealing to its IEnumerable implementation, which is far from an ideal solution. On closer inspection the same seems to be true with FSharpMap and FSharpSet.

I was wondering if it would make sense to incorporate ICollection implementations for F# collections in future versions of F# core. I could provide a PR if this is agreeable to you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions