Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static type checking for match #327

Closed
lastmjs opened this issue Mar 27, 2023 · 1 comment
Closed

Static type checking for match #327

lastmjs opened this issue Mar 27, 2023 · 1 comment

Comments

@lastmjs
Copy link
Member

lastmjs commented Mar 27, 2023

Right now our match function is limited in its static type checking. It will not statically tell you whether or not you have a handler for all keys, will not ensure that the _ is used as a catch-all, and probably more. It would be great if the Kybra match function were just as powerful as the Rust match function, but as least as powerful as Azle's.

What we really want from Python's type hinting system is something like TypeScript's keyof operator or index types. Unfortunately the Python type hinting system seems to just not be powerful enough to do this yet. Here are a number of issues that explore these limitations:

@lastmjs
Copy link
Member Author

lastmjs commented Apr 2, 2024

We are looking to remove match entirely

@lastmjs lastmjs closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant