Skip to content

Generalization of maps: "Covariant" maps #528

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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