-
Notifications
You must be signed in to change notification settings - Fork 121
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
[Stdlib] Add type check macros #470
Labels
Comments
The big problem here is that it will almost certainly conflict with existing identifiers in a large number of existing codebases. Until we have a mechanism to opt in to new built-in macros, I don't think we can introduce these as it will be a breaking change. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Having simple macros like
string?
,number?
,table?
,nil?
, etc. would increase the readability of code that may use them.The only thing I'm worried about is the existing
table?
in macro context. iirc, it checks if an AST node is a table literal, as opposed to runtime type of table. I think it wouldn't be unreasonable to rename AST checking macros to be:table-literal?
,sequence-literal?
, etc.The text was updated successfully, but these errors were encountered: