Skip to content

Can we have a nicer match syntax? #4

@radix

Description

@radix

How about:

with match(myobj):
    with case(MyClass.MyConstructor) as x:
        x.y
    with case(MyClass.MyOtherConstructor) as x:
        x.z

I think I could implement this, but I'm not sure how I would implement exhaustiveness checking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions