Skip to content

Generalization of maps: "Covariant" maps #528

@ske2004

Description

@ske2004

I need to convert map[...]Type to map[...]any, but it's not possible (I think)

My usecase is that I want to have a generic resource caching function where I can put resource into map[...]any while operating on a specialized map of resources.

But obviously converting it is impossible without changing the ABI. This is the same thing as with covariant dynamic arrays.

As far as I see the only way to solve this is through generics of some sort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions