Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Support for instanceof #36

Open
jeromesimeon opened this issue Mar 14, 2018 · 0 comments
Open

Support for instanceof #36

jeromesimeon opened this issue Mar 14, 2018 · 0 comments

Comments

@jeromesimeon
Copy link
Member

jeromesimeon commented Mar 14, 2018

It would be great to be able to match values against types. This could be a new operator in the language e.g., e instanceof T or e is of type T.

This could also be used for the underlying semantics of define variable x : T := e.

I believe instanceof can be supported as an operator and compiled to an underlying combination of data-type inference and sub typing (See querycert/qcert#95).

Additionally, this might allow us to consolidate the pattern matching expression, which currently only works for either class names or values, and from there to generalize the type dispatch implemented for #15

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

1 participant