Skip to content

FR: automatically derive to/from index for trivial tuple-types #993

Open
@Cokemonkey11

Description

@Cokemonkey11

Here is an example:

public tuple instant(real timestamp_seconds)

public function instantToIndex(instant inst) returns int
    return realToIndex(inst.timestamp_seconds)

public function instantFromIndex(int index) returns instant
    return instant(realFromIndex(index))

Only saves 4 lines of code to automatically derive this, but would be nice!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions