Skip to content

value as general data pointer #2563

@plajjan

Description

@plajjan

value is a builtin union and I've always imagined that it would go away once the union support improves, but I've realized it can also be used a generic data style pointer. Like in many C APIs, there is some struct and it has a data field which is a pointer to your own data in case you want to store many things.

We have type variables and while it allows any type it doesn't allow different types, so if we have like a common storage of things where we want our "data pointer" then multiple different users (calling code) cannot store different data things, only the same. So... I reckon we should keep the value type even in the future, but maybe it should be never be inferred?

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